Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Loader Function

Posted on by 335

Hello all,

I have an entity on create of which a plugin executes. Plugin takes much time so i want to show some loader on the form. The plugin updates the value on the form. Is there any supported way for this? I am using Dynamics 365(Online).

Thanks in Advance

*This post is locked for comments

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: Loader Function

    Hi

    You can convert your plugin into custom workflow activity and call that custom WF activity in synchronous workflow.  

    Put field bit field on form and set this this field to Yes from JS and execute your workflow on onchange of this bit field

    At the end of workflow Mark this field to No again using Update Setp.

    When this field set to Yes put Interval or setimeout method of JS untill it is set to No again by WF and then in Interval or settimeout method show your loader div in JS

    Mark as verified, if it works for you

  • Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: Loader Function

    How are you creating the bulk records?

    I am a bit confused as to why you want to show a 'loader' on a form while you are doing a bulk load.

    Or is your Create of a record triggering the Bulk Create of further sub-children records?

  • Nishkarsh Vaish Profile Picture
    Nishkarsh Vaish 335 on at
    RE: Loader Function

    It is a Sync Plugin.

    Actually am creating the bulk record so the time is totally dependent on the number of records to be generated...

  • Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: Loader Function

    HI Nishkarsh,

    Can you provide more details about the plugin?

    1. Is it Sync / Async plugin?

    2. How much time is it taking to update the value after Create?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Loader Function

    Hi! 


    I think you can find it in the right corner, where the icon 'Save' is located. (The loader is spinning there).
    After pressing the icon 'Save' the loader starts spinning.

    I am not 100%, but I think you can make this by using script - you can create a JavaScript function on save event which will show loader.

    Hope this helps

     

    Vlad

    http://dynamicalabs.com/

    Disclaimer: Any post on this page provided "as is" without warranty of any kind and is for educational and information purposes only. We disclaim any liability arising from any reliance placed on any post

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Loader Function

    Plugins only run on the server-side, so cannot affect what is displayed on the form. You'll need client script to change the form display. One option could be:

    1. Have the plugin run asynchronously, so the save completes quickly
    2. Add a client script function that runs on the Onload event on the form, and periodically checks if the plugin has updated the data in CRM, and reloads the form when the data has been updated

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans