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 :
Microsoft Dynamics CRM (Archived)

Show loading GIF.

(0) ShareShare
ReportReport
Posted on by 510

Hello everyone.

I have a requirement here that I need to show a waiting screen to the user while a plugin execute.

I know many ways for doing that, but almost all are unsupported. The only supported way that I know is calling the Alert.Js solution methods to open a modal dialog, hide this modal dialog before showing on screen and show a <div> with the GIF instead, all inside the HTML WebResource.

So, Does anyone know an easy supported way for doing that?

Note: I tried to use the supported method "Xrm.Utility.openWebResource" but it is opening my HTML in another screen.

Cheers.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    If you're on v9.0 then you can use Xrm.Utility.showProcessIndicator/Xrm.Utility.closeProcessIndicator - butenko.pro/.../microsoft-dynamics-365-v9-0-whats-new-in-clientside-for-devs-besides-xrm-webapi

    But if you're on earlier version you have no options and just FYI Alert.js is not supported extension because it uses DOM manipulations. But you can check source of it to get understanding how it's done - github.com/.../alert.js

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi,

    If you are using D365 v9 you can use the Xrm.Utility.showProgressIndicator and closeProgressIndicator methods.

    If you are using an earlier version you need to use Xrm.Utility.openWebResource.

    You can also use alert.js:

    github.com/.../alertjs

    alert.js has a method called Alert.showLoading

    Hope this helps.

  • Verified answer
    tw0sh3ds Profile Picture
    5,600 on at

    There is no supported way of doing that. But using Alert.js is something I like to call "acceptable unsupported" if you are using this for user's convenience, not as something driving your business process. So showing loader is perfectly fine, just have in mind that it will not work on mobile devices, so you should put a proper JS to do it only for standard web clients.

    This is supported Out-Of-The-Box in Dynamics 9.0 and since you are on Online - you will soon be having this version. So simply use Alert.js if you NEED it now (or convince CRM Product Owner that it will be supported soon and it's good to wait) but write also code using new Xrm.Utility.showProgressIndicator function if it's available (you can simply do if(Xrm.Utility.showProgressIndicator) in JS it's really easy...) so that after migration to the newest version, you will not have to move a finger to change that.

    EDIT: Too slow, Andrii and Aric already posted the same. On Wild West I would be dead already :)

  • Suggested answer
    Syed Ibrahim Profile Picture
    6,257 on at

    Hi Henrique,

    There is cool feature new release (v9) to make user to wait upon some time take operation in the background by showing custom message on progress bar.

    Call the below js upon the event triggered.

    function ShowCustomMsg() {

    Xrm.Utility.showProgressIndicator("Loading contact Details..");

    setTimeout(delayedLoadPrimaryContact, 10000); }

    function delayedLoadPrimaryContact()
    {
        var contact = Xrm.Page.getAttribute("primarycontactid").getValue();
        if(contact == null){
           Xrm.Utility.closeProgressIndicator();
           return;
        }
        Xrm.WebApi.retrieveRecord("contact", contact[0].id, "$select=emailaddress1")
        .then(function(result) {
            var email = result["emailaddress1"];
            Xrm.Utility.closeProgressIndicator();
            alert("Here is the email: "+email);
        })
        .fail(function(error) {
            Xrm.Utility.closeProgressIndicator();
            var message = error.message;
            alert("Error: "+message);
        });
    }

    For more detail. Pls refer below link.

    https://community.dynamics.com/crm/b/exploringdynamics365/archive/2017/10/17/dynamics-365-v9-progress-indicator-api

  • TemaPrinter Profile Picture
    5 on at

    Hello HenriquePalomo you can find the preloader gif http://icons8.com/preloaders

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans