Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

In Microsoft Dynamics CRM 4.0, workflows fail at the Send Email step and transition to the Waiting state


View products that this article applies to.

Symptoms

When sending an email via workflow in Microsoft Dynamics CRM 4.0, the workflow fails on the send email step and reverts to the waiting state. This error does not occur if the CRM tracking token is enabled. The error message in the workflow is as follows:

An error has occurred. Try this action again. If the problem continues, check the Microsoft Dymamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

The error message in the System Job message column is as follows:

Workflow paused due to error: Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. Detail: <detail><error>  <code>0x80040216</code>  <description>An unexpected error occurred.</description>  <type>Platform</type> </error></detail>  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)  at Microsoft.Crm.SdkTypeProxy.CrmService.Execute(Request Request)  at Microsoft.Crm.Asynchronous.SdkTypeProxyCrmServiceWrapper.Execute(Object request)  at Microsoft.Crm.Workflow.Services.SendEmailActivityService.Execute(ActivityExecutionContext executionContext, SendEmailActivity sendActivity)  at Microsoft.Crm.Workflow.Activities.SendEmailActivity.Execute(ActivityExecutionContext executionContext)  at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)  at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)  at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)  at System.Workflow.Runtime.Scheduler.Run()


↑ Back to the top


Cause

The subject of the email is blank. The issue does not occur with the tracking token enabled because the token will automatically populate the subject field.

↑ Back to the top


Resolution

Update the workflows to populate the subject field in all Send Email steps

↑ Back to the top


More Information

This issue will not occur in CRM 2011.

The Microsoft Dynamics CRM 4.0 platform trace error is as follows:

CrmSoapExtension detected non-CrmException - report will be sent to Watson:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Object.GetType()
at Microsoft.Crm.Sdk.ClrTypeFormatter.InternalFormat(FormattingContext context, String fieldName, Object fieldValue)
at Microsoft.Crm.Sdk.ResponseFormatter.Format(FormattingContext context, IRequestBuilder requestBuilder, PropertyBag outputs)
at Microsoft.Crm.Sdk.ResponseBase.WriteXml(XmlWriter writer)
at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write27_ExecuteResponse(Object[] p)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Web.Services.Protocols.SoapServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream)
at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
--- End of inner exception stack trace ---

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2500624
Revision : 1
Created on : 1/7/2017
Published on : 7/20/2012
Exists online : False
Views : 458