Global notification – Xrm.App (Client API Reference) – In Preview – Dynamics 365

Global notification – Xrm.App (Client API Reference) – In Preview – Dynamics 365

Hi Everyone,

There are many times we might have got an requirement to show some kind of notifications globally in Dynamics 365 and there is no supported way to do it. Here is the supported way to do the same which is coming in, there is a new client API reference called Xrm.App which has two methods

1) addGlobalNotification
2) clearGlobalNotification

Please note this is a Preview feature, refer this link for more information on the updates.

To show the notification first, we need to event to trigger and that event can be from anywhere. For example, I would want to show the notification when Customer Service Representative opens a case in Dynamics 365 saying “Please inform Customer that Tomorrow is a holiday.”

To implement this, we have to call the below piece of code on the load event on the case form.

We can also optionally add a button and make it navigate to another URL if you would like to provide more info. In my example, I redirected to

level: Number. Defines the level of notification. Valid values are:
1: Success

2: Error

3: Warning

4: Information

This notification remains App-wide unless closed by the user or cleared by using clearGlobalNotification method.

This can be more dynamic, you can have one some configurations saying ShowGlobalNotification, Message and Link. Whenever, you put ShowGlobalNotification to True, the code should execute and notification would be shown to the users. It can be turned Off by changing the configuration to False. No need of development and deployment.

Hope this helps.

Happy 365’ing

2 thoughts on “Global notification – Xrm.App (Client API Reference) – In Preview – Dynamics 365

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s