Show Loading Screen in Dynamics 365 using Client API reference

Suppose, you want to show a loading/waiting screen to let people know there’s some heavy processing going on in the back-end and they shouldn’t navigate away to do anything else with the record, you can use loading screen by using showProgressIndicator() and closeProgressIndicatory() methods.

Xrm.Utility methods

There are 2 methods are documented in the Xrm.Utility of Microsoft Docs that you can use to achieve this. Microsoft reference here.

In this scenario, let’s say you want to show the Loading page while your Action is being performed by the JavaScript code.

  1. You can place the Xrm.Utility.showProgressIndicator(message); before you begin your code to invoke an action and place Xrm.Utility.closeProgressIndicator(); in your success and failure messages.
    codePositions

Execution

Whenever your JS code will call the action, the progress message will be displayed on the screen as below  –

In Classic UI
clasicMessage

In Unified Interface –
UCIMessage

And once the process is complete, the Xrm.Utility.closeProgressIndicator will remove the message as below and bring back the form you were working on –

messageOver

Side Note: If you are using action calling from JS using invokeProcessAction, as of the day of this post – This doesn’t work well and results in action not supported error on the UCI – invokeProcessAction does not work in UCI

Hope this helps!

Advertisement

One thought on “Show Loading Screen in Dynamics 365 using Client API reference

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.