
To add notifications on Forms you can use the very handy Xrm.Page.ui.setFormNotification.
This will allow you to show the following alerts.
To add them use the following:-
Xrm.Page.ui.setFormNotification(“Important Test”, “ERROR”)
Xrm.Page.ui.setFormNotification(“Warning Test”, “WARNING”)
Xrm.Page.ui.setFormNotification(“Info Test”, “INFO”)
NOTE:- Alot of blog posts out there have the last one as:-
Xrm.Page.ui.setFormNotification(“Info Test”, “INFORMATION”)
This is NOT correct and will mean the information icon won’t appear.
See the official documentation here:-
https://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_setFormNotification