Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Effect of Errors in Pre-Execution/Post Stage on Updates Made in Pre-Validation Stage in Dynamics CRM Plugins

(0) ShareShare
ReportReport
Posted on by 11

Hi,

In Dynamics CRM, if updates are made in the pre-validation stage of a plugin, and an error occurs in the pre-execution or post stage of another plugin registered for the same event, what will be the effect on the updates made in the pre-validation stage? Will the updates be rolled back automatically or stored in memory and not yet committed to the database? 

Im not getting it correctly from the documention for the bold text "Stages 20 and 40 are guaranteed to be part of the database transaction while stage 10 may be part of the transaction."
https://learn.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg327941(v=crm.8)?redirectedfrom=MSDN#:~:text=organization%27s%20execution%20pipeline.-,Inclusion%20in%20database%20transactions,-Plug%2Dins%20may

Or if someone can give examples scenerios where we are in transaction for the pre-validation and when we not.


For reference, got this post while I was searching this scenerio, I've not tried it myself.

I'm looking for clarification, Thank you in advance for your expertise!

  • Feminho Diniz Profile Picture
    67 on at
    RE: Effect of Errors in Pre-Execution/Post Stage on Updates Made in Pre-Validation Stage in Dynamics CRM Plugins

    Hi Muhammad. About my post:

    I really don't know why it was rolling back. Honestly, it's still a mystery to me. I don't know why it was solved by changing the steps of the execution of the plugin but it worked... maybe the team was created but not associated with any record at the end? really don't know. Still, it was the only strange case I had with plugin steps in 8 years of Dynamics CRM. Usually, it runs like that:

    1) Pre-Validation plugins are out of any transaction so they will never roll back the operation. For example, if you create an Account and a Pre-Validations plugin goes on error, the Account will still be there

    2) Any error in any Sync plugin on Pre or Post Update will rollback the entire chain as they are part of the same transaction

    3) Async plugins that go on error will also rollback but they have individual transactions so it will be rolled back without affecting other plugins (community.dynamics.com/.../657077)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,145 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,896 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans