{Dynamics 365 Enhancements} Add Notification Recommendations to your Entity forms using script

Recommendation Action in Business Rules in Dynamics 365

MSDYNAMICSBLOG BY DEEPESH

This blog is part of the series which I will use to cover all interesting enhancements coming in Dynamics 365.

Scenario: On Account form, if user fills in the Telephone field – suggest a recommendation to set Contact preference by Phone field. If user selects yes, set Contact by Phone option to allow.

Scenario by Graphics:

· On change of phone field, CRM shows a recommendation tooltip:

clip_image001

· When you click the information icon, CRM gives you a recommendation:

clip_image002

· If you pick Apply, CRM will do the updating to the field as required:

clip_image003

Great isn’t it?

Here is the link describing the new Client side scripting function: https://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_addnotification

And here is the script for this one (Register it on change event of Phone field):

function addPhonePreferenceNotification() {

var myControl = Xrm.Page.getControl(‘telephone1’);

var telephone= Xrm.Page.data.entity.attributes.get(‘telephone1’);

var phonePreference = Xrm.Page.data.entity.attributes.get(‘donotphone’).getValue();

if (telephone.getValue() != null) {

var actionCollection = {

message:…

View original post 62 more words

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

One thought on “{Dynamics 365 Enhancements} Add Notification Recommendations to your Entity forms using script”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s