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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Plugins - Ensure an Async Plugin runs only after the Sync Plugin finishes

(0) ShareShare
ReportReport
Posted on by

Hi,

We have a situation where we want our sync opportunity plugin to execute first before the async opportunity plugin runs based on business requirements.

Right now, we wait sleep 5 seconds in async plugin to give the sync plugin enough time to execute. (Bad solution).

We would like to improve this. Thoughts?

Thank you!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Syed Ibrahim Profile Picture
    6,257 on at
    RE: CRM Plugins - Ensure an Async Plugin runs only after the Sync Plugin finishes

    +1 from me , as sync always proceeds the async in the exe pipeline there won't be any issue. If you still consider to be delayed always for your business scenario then create your async plugin as asyn custom workflow.  Plugin always executes first.

    Hope this will solve your prob

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: CRM Plugins - Ensure an Async Plugin runs only after the Sync Plugin finishes

    Hi Anatoliy,

    setting right the execution pipeline, as Andrew writed, should suffice.

    However if you have a complex scenario, maybe will be useful to make the async plugin belongs to a specific date or boolean attribute (that you need to create) set by the sync plugin.

    So, you will be sure the async plugin starts after sync plugin action.

    This is a trick i've used many times.

    Please let us know.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • ashlega Profile Picture
    34,477 on at
    RE: CRM Plugins - Ensure an Async Plugin runs only after the Sync Plugin finishes

    +1 for what Andrew wrote.. but, on the other hand, the problem might be somewhere else. If you have a sync plugin that's doing something that, in turn, is happening asynchronously, maybe that's why you had to use that wait.. but it's a different story then.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: CRM Plugins - Ensure an Async Plugin runs only after the Sync Plugin finishes

    Hey,

    You don't need any timeout. Based on the execution pipeline sync plugin will be always executed before async plugin.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans