Good Day,
When an sales order is created,I have a background workflow that create a service activity in order for the dispatcher to dispatch the sales order.
Some workflows work well and others generate an error which says that "scheduledstart" field cannot be null. Noting that this field is filled in the workflow.
Any idea why this is happening?
The error is as below:
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.CreateEntity]
[CreateStep1: Create Service Activity]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: scheduledstartDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220989</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>scheduledstart</Message>
<Timestamp>2017-12-05T15:19:31.7641342Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220989</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>scheduledstart</Message>
<Timestamp>2017-12-05T15:19:31.7641342Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d4p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.ArgumentNullException: Value cannot be null.
Parameter name: scheduledstart</Message>
<Timestamp>2017-12-05T15:19:31.7641342Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</InnerFault>
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.CreateEntity]
[CreateStep1: Create Service Activity]
</TraceText>
</OrganizationServiceFault>
at Microsoft.Crm.Workflow.Services.CreateActivityService.Execute(ActivityContext executionContext, CreateEntity createEntity)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
*This post is locked for comments