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!
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/.../