web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Show progress indicator not appearing when I run my code

(0) ShareShare
ReportReport
Posted on by 92

Hello,

I hope someone can help me with my problem.

I created a javascript that calls a process to run a plugin, meanwhile, I added

Xrm.Utility.showProgressIndicator("Processing..."); to show a loading screen as the plugin executes.

I will add an attachment of my code so you may see where I am showing and closing the progress indicator.
The problem is that the code was working fine and suddenly it stopped showing the progress indicator.
I tried to debug my to check the error but Xrm.Utility.showProgressIndicator("Processing..."); is returning undefined and I guess it is working.
I hope someone can help me and assist me to show the progress bar indicator.
I am showing the progress indicator on line 2.
Closing it on lines 52 and 98.
[View:/cfs-file/__key/communityserver-discussions-components-files/117/HireOnClick.js:320:240]
pastedimage1671612724964v2.gif
 
Thank you!
I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at
  • MBaba Profile Picture
    92 on at

    Hello Abdul Wahab ,

    Thank you for your help.

    I have already read these blogs and checked them, yet its still not working.

    As you can see in my GIF it is returning undefined, as it should, but the loading UI is not appearing.

    Thank you!

  • Community member Profile Picture
    2 on at
    Not sure if you have resolved this issue. The first problem appears to be the logic of the code itself. As the debugger shows, setting the "res" variable to the "showProgressIndicator" statement means "res" will always be undefined. So the While loop never starts.

    Similar to the OP's issue, the second problem has to do with the indicator displaying; but my problem was the indicator started only after the plugin logic finished.

    To get around this, I wrapped the main logic of the JavaScript in the setTimeout callback. I put the "closeIndicator" function in the plugin request callback as part of the main function logic.
     
    function CallCustomActionFromJavaScript(primaryControl){
    debugger;
    
        Xrm.Utility.showProgressIndicator("Custom Message");
        setTimeout(mainFunction, 1000);
        
        function mainFunction(){}
    }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans