If your CRM 2011 online instance has recently been upgraded to CRM 2011 UR12 (Polaris), you may have noticed that a few things don’t work as well in Javascript as they used to. One of the major annoyances is that the notification code posted here stopped working.
I investigated the problem, and found that the AddNotification function is now no longer attached to the element “crmNotifications”, but to a separate object within the Javascript object model. Below is an updated version of the code that should work with Polaris.
addNotification = function (message, level) {
var notificationsArea = $find('crmNotifications');
if (notificationsArea == null) {
alert('notifications 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);
}
}
The changes can be found on the second line, which uses an internal undocumented function $find. Having said that, the document.getElementById function is also an unsupported method, so if it didn’t work before – and does now – you’re in the same situation as you were previously.
Useful Resources
http://blogs.msdn.com/b/johnsullivan/archive/2011/11/02/crm-2011-custom-form-notification.aspx
http://marcoamoedo.com/blog/show-custom-warning-messages-on-microsoft-dynamics-crm/


I have increasingly noticed a trend on social networking sites, where people post up links to various other sites and expect that they can commandeer the attention of their supposed friends or followers. In one recent particular case, the link in question was to a 30 minute video.