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 :
Customer experience | Sales, Customer Insights,...
Answered

Can I avoid a rollback at exception?

(0) ShareShare
ReportReport
Posted on by 155

I have a javascript that creates a record, which then triggers a plugin (POST operation and sync) on create. If a exception is thrown in the plugin the Dynamics platform will perform a rollback and the entity will not be created. That is how Dynamics works. However, I would prefer if the post is still created and a status on the record is set to Failed.

Is there any way I can avoid my record being rolled back? What would happen if I catch the exception in my plugin and not re-throw the exception?

Also the plugin HAS to be sync - cannot be async since it the operation has the occur directly.

Thanks in advance!

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Can I avoid a rollback at exception?

    Hello,

    I'm afraid you can't avoid rollback - this is the way how it works.

    You can try catching the exception without it being rethrown but there could be consequences as far as I remember - andz88.wordpress.com/.../

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 179

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 127 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans