Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Process failure in sync and async mode results in what

(0) ShareShare
ReportReport
Posted on by 17

Hi Guys,

     Can you please help me to know, what happens in below scenario

1. Plugin registered in PreValidation stage in sync mode fails. What happens in that case, will the plugin registered in PreOperation execute or is there any rollback involved.

2. Plugin registered in PreValidation stage in async mode fails. What happens in that case, will the plugin registered in PreOperation execute or is there any rollback involved.

3. Plugin registered in PreOperation stage in sync mode fails. What happens in that case, will the platform core operation execute or is there any rollback involved.

4. Plugin registered in PreOperation stage in async mode fails. What happens in that case, will the platform core operation execute or is there any rollback involved.

5. If platform core operation fails, will the changes made by PreValidation & PreOperation get rollback.

6. Plugin registered in PostOperation stage in sync mode fails. What happens in that case, will the platform core operation as well as changes made by PreValidation & PreOperation get rollback.

7. Plugin registered in PostOperation stage in async mode fails. What happens in that case, will the platform core operation as well as changes made by PreValidation & PreOperation get rollback.

Thanks in advance

*This post is locked for comments

  • Prashant D Profile Picture
    Prashant D 17 on at
    RE: Process failure in sync and async mode results in what

    As per my understanding the async mode plugin run on different thread by async service

    If pre-operation/post-operation plugins defined in async mode fails, still the operation will get rollback?

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Process failure in sync and async mode results in what

    Hi Prashant,

    Execution in pre-validation stage might not be part of the database transaction.

    If pre-validation plugin fails, the operation is not rolled back and hence pre-operation and post-operation plugins will get triggered.

    If pre-operation plugins fails, the operation is rolled back and hence post operation will not be triggered.

    See: crmbook.powerobjects.com/.../event-pipeline

    Hope this helps.

  • Prashant D Profile Picture
    Prashant D 17 on at
    RE: Process failure in sync and async mode results in what

    In PreValidation, suppose we are making some validation check.

    How will PreValidation plugin behave, if there is failure in plugin.

    1. in sync mode, if failure happens will the PreOperation plugin execute or if we don't have PreOperation plugin will the platform core operation execute.

    2. in async mode, if failure happens will the PreOperation plugin execute or if we don't have PreOperation plugin will the platform core operation execute.

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Process failure in sync and async mode results in what

    Hi,

    You must understand Plugin will run in sequence. So if you have PreValidation Plugin and failed, It will not triggering PreOperation, PostOperation.

    Do you mean that in PreValidation, there is update to another entity that has PreOperation Plugin?

    Async and Sync actually will have same result. Only if Async it will run at behind. So when it failed, you need to go to Setting > System Jobs there to check the detail error.

    All the information you need already in msdn.microsoft.com/.../gg327941.aspx article.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans