Reputation: 1
Our CRM experienced an error and cannot update the record and experienced this error: `
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot update Closed or Cancelled ActivityDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Cannot update Closed or Cancelled Activity</Message>
<Timestamp>2016-11-08T03:37:50.997897Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[79b7ca55-7812-e611-8126-c4346bad26cc: ]
Starting sync workflow 'Ph2 CSF Status', Id: 6eb7ca55-7812-e611-8126-c4346bad26cc
Entering ConditionStep1_step: Automatic update of Status field in CSF
Entering SetStateStep15_step: If RM approves the CSF
Sync workflow 'Ph2 CSF Status' terminated with error 'Cannot update Closed or Cancelled Activity'
</TraceText>
</OrganizationServiceFault>
` this happened when we try to update an existing record from in process to approved.
Upvotes: 0
Views: 4958
Reputation: 1761
The error is pretty self-explanatory I think:
workflow 'Ph2 CSF Status' terminated with error 'Cannot update Closed or Cancelled Activity'
Your workflow has a step ("If RM approves the CSF") which is trying to update an activity which is already close/cancelled. You will need to update the activity before closing it or change the status to an active on before updating it (and then close it again).
Upvotes: 2