I had this scenario where I had to add a Notification on form.
Notification was required to be a hyperlink, on click of which, I was asked to get focus on a tab.
But this can be done similarly to navigate to a URL, navigation Pane Item etc
1. On Form Onload, add this script:
var notificationsArea = document.getElementById(‘crmNotifications’);
notificationsArea.AddNotification(“1”, 3, “1”, “<a href=’#’ onclick=’Xrm.Page.ui.tabs.get(<tabname>).setFocus();’ title=’Test’ ><u><Message to be displayed></u></a>” );
Generic layout : Addnotification(Param1, Param2, Param3, Param4)
Param1: UniqueId for notification
1. Critical notification
2. Warning notification
3. Info notification
Param 3: I tried to search for this. But not able to figure out yet what this is about. I tried adding a text, number and even left it as such with blank quotes(”). All of these worked
Param 4: Message you want to display. In my example I replaced message with an anchor tag to make my Display text behave as a a link. Anchor tag was not adding an underline to Displaytext, so I added <u> tag.
Note: This is unsupported customization as AddNotification() is not listed in SDK
Hope it helps someone.