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 :
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!

I have the same question (0)
  • Feminho Diniz Profile Picture
    67 on at

    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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans