Robert M.
Robert M.

Reputation: 99

Preventing update rollback when exception occurs in CRM 2011 Plugin

Given that the existing OrganizationServiceContext for a Plugin is performs updates in the current SQL transaction context (assuming pre or post validation event), is there an efficient way to update a separate entity outside this transaction/context?

The goal is to avoid rollback of updates on a different entity (other than the Plugin target entity) when an exception is thrown.

Upvotes: 0

Views: 1771

Answers (1)

djluis
djluis

Reputation: 362

Just create a new IOrganizationService rather than use OrganizationServiceContext.

Check this example.

Upvotes: 2

Related Questions