Fighting “General SQL Error” in Dynamics CRM custom workflows

Working for my client Valx, I had some serious problems in custom workflows for Microsoft Dynamics CRM 4. Every now and then, a workflow would throw a SoapException. I always put the original exception in the InvalidPluginExecutionException (second parameter “inner exception”). Now the actual exception information you want to see is in SoapException.Detail, which is an XmlNode. You won’t see that info if you just put the SoapException in the InvalidPluginExecutionException’s inner exception. Therefore, I use the following try/catch construction in each custom workflow’s Execute method to see some relevant information in the WorkflowLog view of the Dynamics CRM database.

Continue reading Fighting “General SQL Error” in Dynamics CRM custom workflows