USING JAVASCRIPT TO ADD SPINNER AND BLOCK UI IN DYNAMICS 365 AND POWER APPS

Talha Manzoor
0

 In Power Apps and Dynamics 365, when writing custom JavaScript code, you may want to stop users from interacting with the user interface while your JavaScript code is processing. An example of this might be when a user clicks a custom button and some code runs, and while the code is running we want to display a “Processing” message until the code is complete.

We can do this easily in Power Apps / Dynamics 365 using Xrm.Utility.showProgressIndicator. Let’s look at how to use this.

If we open a Power Apps / Dynamics 365 page, such as the customer, and go to the browser’s Console in the Dev Tools, we can run the command Xrm.Utility.showProgressIndicator(). Before running it, we see it looks like below:

When we run the code, we see our Dynamics 365 UI is now greyed out and the UI is blocked from user interaction. The page has a spinning icon, and the user is unable to click anywhere in the page:

Post a Comment

0Comments

Post a Comment (0)