Get Ready for the Next Release of Microsoft Dynamics CRM
Problems configuring the CRM Outlook client? Use the wizard!
Customer Center for Microsoft Dynamics CRM 2013
Customer Center for Microsoft Dynamics CRM 2011
Technical Support FAQ: Online | On-Premise
Developer Center and SDK
Hello - I have plugin for email create. I get a handle to the email object in the plugin in the normal way and I'm able to access all of the expected email properties.
As part of the email create logic, I create a case and then associate the email with the case by setting the email RegardingObjectId = case ID.
Then I try to update the email object using the service context: service.Update(email).
I'm able to use the service in the same plugin to create a contact and case but I can't use the service to update the email object. It returns a rather unhelpful FaultException: "An unexpected error occured."
I also tried using the service at the very beginning to update the email object, right after I get the email object from the context, and I get the same unexpected error. This tells me that the error does not have to do with setting a property on the email.
If I get a handle to the current object in its post-save plugin, do I need to do something special with it in order to call the service.Update method on it? Based on this problem description can you figure out what I'm doing wrong here?
You really need to find out what exception is being thrown - use platform tracing - crmdiagtool2011.codeplex.com
It could be a record locking issue - could you not update the email target in the pre-event pipeline step without using the service.Update?
Read my Blog | Follow Me on Twitter | Rockstar365
try to debug remotely the plugin and see what is going wrong
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics