crm workflow - transaction management? RRS feed

  • Question

  • Hello, does CRM provide any type of support for transaction management between workflows?  Not sure if there's any type of special method call, parameter or token that can be used to configure different w/f's to succeed or fail as a transaction?

    Tuesday, April 29, 2014 10:53 PM

All replies

  • Hi,

    In CRM 2013 real-time/synchronize workflows do participate in transaction. If you run multiple real-time/synchronous workflows within the parent-child context they will all succeed or fail as a transaction. 

    Create real-time workflows


    Tuesday, April 29, 2014 11:17 PM
  • @Ronald - Thanks for that perspective.  What if you had 3 workflows where wf2 updated some type of external legacy system.  Does CRM provide a structured way to rollback the wf2 legacy system update?  For example, do CRM workflows provide an OnRollback event handler, or something similar, where custom logic can be written to perform special custom rollback actions for a particular workflow?

    Thursday, May 1, 2014 8:52 PM
  • There are no events exposed for transaction rollback, CRM handles it internally. Also it won't do any rollback in your legacy system but you should be able to implement that under try catch block I hope.

    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Friday, May 2, 2014 4:10 AM
  • No. All bets are off for anything outside of CRM. There is no framework for rolling back those transactions manually. When there is no hooks you could use for transaction rollback, I doubt you would be able to implement transaction compensation in try catch block in a meaningful way.


    Friday, May 2, 2014 4:23 AM
  • Here is an interesting post on hooking custom SQL statements to the current CRM transaction, but as the author pointed out it is not supported.

    SQL Queries from Transactional Plugin Pipeline


    Friday, May 2, 2014 4:35 AM