Set Form and Field notifications CRM 2013 JavaScript New feature

Set field notification

Xrm.Page.getControl(fieldname).setNotification(“Notification message”);

Clear field notification

Xrm.Page.getControl(fieldname).clearNotification();

Set form notification

//First parameter is message, second is notification type, third is optional id parameter

Xrm.Page.ui.setFormNotification(‘Error! Message’,’ERROR’,’1′);

Xrm.Page.ui.setFormNotification(‘Warning!Message’,’WARNING’,’2′);

Xrm.Page.ui.setFormNotification(‘Information! Message’,’INFORMATION’,’3′);

Clear form notification

//Pass parameter id of notification which needs to be cleared

Xrm.Page.ui.clearFormNotification(‘1’);

Advertisements

Leave a Reply

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