Calling the Progress Indicator in Microsoft Dynamics 365

Arpit Malhotra, 27 February 2018

One of the great features in the release of Dynamics 365 was out of the box functionality to display the progress indicator on the form. It’s most beneficial in cases where users have to wait for the data to load or for the long-running process to complete. It may also be used to prevent users from doing anything on the screen until the background process is completed, consequently enhancing the customer experience.

It provides a great ease to the developers as this can all be done by a single JavaScript piece of code and thus relieving the developers from the pain of writing custom code to achieve similar functionality. The indicator can just be called with the below JavaScript function of the Xrm.Utility namespace:


Xrm.Utility.showProgressIndicator(“Loading Records. Please wait!”);


This function takes a string parameter to display on the progress indicator. The string takes up to 36 characters. For the characters above this limit, it truncates them by replacing it with three dots at the end of the sentence.

This is how the indicator looks like on the form:

image


Xrm.Utility.closeProgressIndicator();


The above method is called to hide the indicator. It doesn’t take any input argument and won’t do anything if the progress indicator isn’t visible on the form.