Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM

How To : Display Warning Message On The CRM Form

Leave a comment

Brief : In this article am gonna show the code which allows you to display a warning message on Microsoft Dynamics CRM Form


function Notification() {
var attributes = Xrm.Page.data.entity.attributes;

var notificationsArea = document.getElementById(‘crmNotifications’);
/*clear out notification area*/
notificationsArea.SetNotifications(null, null);

if (notificationsArea == null)
alert(‘div not found’);
The integer is the notification type
1 = Error
2 = Warning
3 = Info
notificationsArea.AddNotification(“<;unique value>;”, 3, “”,”Your text here”);
/*Create some notifications*/
notificationsArea.AddNotification(“1”, 1, “1”,”Test 1″);
notificationsArea.AddNotification(“2”, 2, “2”,”Test 2″);
notificationsArea.AddNotification(“3”, 3, “3”,”Test 3″);


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s