Error on Create of Appointment in CRM 2013 SP1 Rollup 2

Paul Nieuwelaar, 26 March 2015

After updating to CRM 2013 SP1 Rollup 2, we noticed an error on create of appointments in one of our clients systems. The error was a generic "Unexpected Error" which gave no indication of why it was happening

The error in the log file was as follows:

430
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en-NZ">An unexpected error occurred.</faultstring><detail><OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"><ErrorCode>-2147220970</ErrorCode><ErrorDetails /><Message>An unexpected error occurred.</Message><Timestamp>2015-02-18T21:40:16.176421Z</Timestamp><InnerFault><ErrorCode>-2147220970</ErrorCode><ErrorDetails /><Message>System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #EDAB944D</Message><Timestamp>2015-02-18T21:40:16.176421Z</Timestamp><InnerFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" /><TraceText xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" /></InnerFault><TraceText xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" /></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>
0

If you dismiss the error and try to save again, it prompts you that the user is unavailable. This is because CRM has actually created the appointment, however because the error popped up the form did not refresh. If you ignore and save a duplicate appointment will be created.

We had some asynchronous plugins running on create of appointment, however system jobs showed that these were completing successfully, and we've never had any problems with these before.

After disabling the plugins, the error no longer occurred. It didn't matter what the plugin was doing, as long as it was running on create of appointment, and was asynchronous, it caused the error.

The only workaround is to change the plugins to run synchronously. This could slow down performance, but for now it appears to be the only way.

Note that you can also register the plugin on 'Book' of appointment in async mode, however the activityid is not included in the target or context, so this is pretty useless.