Reputation: 1110
Pretty simple question, but I can't find anything about it..
I have a plugin in Dynamics CRM 2013 that listens to the create and update events of an account. Depending on some business rules, some info about this account is written to an external webservice.
However, sometimes a create or update action can be rolled back from outside the scope of your plugin (for example a third party plugin), so the account won't be created or updated. The crm plugin model handles this nicely by rolling back every SDK call made in this transaction. But as I've have written some info to an external service I need to know when a rollback occured so that I can rollback the external operation manually.
Is there any way to detect a rollback in the plugin execution pipeline and execute some custom code? Alternative solutions are welcome too.
Thx in advance.
Upvotes: 1
Views: 887
Reputation: 18895
There is no trigger that can be subscribed to when the plugin rolls back, but you can determine when it happens after the fact.
You may need to tweak the timeout, but besides that, it should work fine.
Upvotes: 1