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.
There are 2 methods are documented in the Xrm.Utility of Microsoft Docs that you can use to achieve this. Microsoft reference here.
- 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.
Whenever your JS code will call the action, the progress message will be displayed on the screen as below –
In Classic UI
In Unified Interface –
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 –
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!
One thought on “Show Loading Screen in Dynamics 365 using Client API reference”
[…] Show Loading Screen in Dynamics 365 using Client API reference […]