Show Notifications On A MS CRM Form With JavaScript

The Microsoft XRM JavaScript Frameworks provides an easy way to show a yellow notification bar on top of the actual form. So you can place prominent notifications that a user can’t miss.

There are three different types of notifications: ERROR, WARNING and INFO.

Example Code:

 Xrm.Page.ui.setFormNotification('WebSerivce is not available', 'ERROR', 'webservicenaid')

Result Output:

Output Message

With the given id you can also easily remove a notification if you want.

Xrm.Page.ui.clearFormNotification('webservicenaid')

You can find more details here.