The code is very simple :
( Taken from http://www.avanadeblog.com/xrm/)
The Alerts are ordered by priority.
var mep=1;
function set_alert()
{
var notificationsArea = document.getElementById('crmNotifications');
if (notificationsArea == null)
{
alert('div not found');
return;
}
if (mep==1)
{
notificationsArea.AddNotification('mep2', 2, 'source', 'Warning message');
notificationsArea.AddNotification('mep3', 3, 'source', 'Info message');
notificationsArea.AddNotification('mep1', 1, 'source', 'Critical message');
mep=2;
}
else
{
notificationsArea.SetNotifications(null, null);
mep=1;
}
}
No comments:
Post a Comment