workflow unhandled exception logging? RRS feed

  • Question

  • Hello, if an unhandled exception occurs in w/f code then CRM writes the error to the Message field of the related AsyncOperation row.  I want to make sure unhandled exceptions are written to the event log. Is there any type of configuration setting I can set, listener I can add, or some other approach I can use to ensure that w/f errors also get written to the event log and not just to the Message field in the w/f AsyncOperation row?
    Monday, April 28, 2014 8:51 PM

All replies

  • Hi,

    I presume you were talking about logging custom workflow activity error to event log? There is nothing out-of-the-box that allows you to re-direct those error messages to event log. But You could reference System.Diagnostics within the code and write the messages to event log with EventLog.WriteEntry inside the catch block (with the assumption that you are not using Online).



    • Edited by Ronald Liu Tuesday, April 29, 2014 1:44 AM
    Tuesday, April 29, 2014 1:43 AM