Search code examples
dynamics-crm-2011dynamics-crmdynamics-crm-2013

Is there a way of rollback the transaction inside Dynamics CRM plugin without throwing exception?


I need to cancel an operation of creating a new entity record from inside a CRM plugin without throwing an exception.

Is there a way of rollback the transaction inside Dynamics CRM plugin without throwing exception?


Solution

  • Create a Custom Action that you then call from the workflow that has a plugin in it that basically determines if the record should be created or not. If it should, it creates it, if it doesn't it just exits.

    This way you don't have to throw an exception, and you can give it a good name "ConditionallyCreateFoo".