CRM 2011 Custom Form Notification
The notification area on the CRM Form is a nice place to put information, warnings and critical information.
This can be easily done with the following javascript function:
addNotification = function (message, level) {
var notificationsArea = document.getElementById('crmNotifications');
if (notificationsArea == null) {
alert('div not found');
return;
}
if (level == 1) { //critical
notificationsArea.AddNotification('mep1', 1, 'source', message);
}
if (level == 2) { //Info
notificationsArea.AddNotification('mep3', 3, 'source', message);
}
if (level == 3) { //Warning
notificationsArea.AddNotification('mep2', 2, 'source', message);
}
if(message == "")
{
notificationsArea.SetNotifications(null, null);
}
}
This will result in the following...