Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Reusing Microsoft's Processing screen for custom async Javascript functions

Posted on by 2,095

Hi all,

Not sure if this is possible but I've added a few command bar buttons along with custom javascript web resources that trigger on field change. The problem is that a few of them uses the web API to run custom async functions but users can't see the async function running.

For example I've added a custom command button that resolves cases without the pop out dialogue box. The problem is that even with a refresh and save function that runs after the function is completed, a user can still accidently click the resolve button twice and get a error. Is there a method to lock then from interacting with anything on the screen kind of like the processing svg that shows when I for example delete a record?

pastedimage1612918004158v1.png

Can I use that same svg spinning icon? How would I lock the form temporarily until a function has finished processing?

  • MikeC282 Profile Picture
    MikeC282 2,095 on at
    RE: Reusing Microsoft's Processing screen for custom async Javascript functions

    That's bloody brilliant. Can't believe I didn't notice this!

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Reusing Microsoft's Processing screen for custom async Javascript functions

    Hi,

    You can use following code when execution of your javascript started

    Xrm.Utility.showProgressIndicator("Processing....");

    On the success call you can use it like below

    function success(result) {

    ///your code

    Xrm.Utility.closeProgressIndicator();

    }

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans