I've a requirement to assign Activity record to certain users based on specific rules configured in the system. To fulfill the requirement I've written a plug-in that uses AssignRequest to assign the activity record to appropriate user. Plug-in is configured in Synchronous mode on CREATE and UPDATE of Activity record. When I try to create an Activity record with the plug-in registered on same activity, it is running with exception that reads as...
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault,
Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]
There should be only one owner party for an activity
When I tried to search for this error, I landed at this Blog where it is suggested to run the plug-in in Asynchronous mode. I did it and it worked. I'm still confused, why the plug-in solution works in Asynchronous mode and why not in Synchronous?