CRM 2015 Case Resolution fails when a default SLA is enabled. Error: This case has already been resolved. Close and reopen the case record to see the updates.

CRM 2015 Case Resolution fails when a default SLA is enabled. Error: This case has already been resolved. Close and reopen the case record to see the updates.

We recently upgraded to CRM 2015 On Premise and decided to enable a default SLA.    As soon as we enabled the SLA, we couldn’t resolve any cases.  Every time we would get the error “This case has already been resolved. Close and reopen the case record to see the updates.”

Case Resolution Error

The log file would show:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFaultMicrosoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: This case has already been resolved. Close and reopen the case record to see the updates.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”&gt;
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic”&gt;
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema&#8221; i:type=”d4p1:string”>0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema&#8221; i:type=”d4p1:string”>-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>This case has already been resolved. Close and reopen the case record to see the updates.</Message>
<Timestamp>2015-01-28T16:21:22.9319315Z</Timestamp>
<InnerFault i:nil=”true” />
<TraceText>
[Microsoft.Crm.Service.ObjectModelMicrosoft.Crm.Service.ObjectModel.CasePostUpdatePlugin]
[4b723f64-b443-422b-a269-34ad739f19ee: CasePostUpdatePlugin]

[Microsoft.Crm.ObjectModelMicrosoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
Starting sync workflow ‘NuSoft SLA’, Id: 819f1467-09a7-e411-9431-00155d23790f
Entering ConditionStep1_step: NuSoft SLA
Entering ConditionStep5_step: Check condition step – Applicable When- KPI1
Entering ConditionStep9_step: Check condition step – Applicable When- KPI2
Entering UpdateStep14_step:
Sync workflow ‘NuSoft SLA’ terminated with error ‘This case has already been resolved. Close and reopen the case record to see the updates.’
</TraceText>
</OrganizationServiceFault>

I started troubleshooting this and as I looked at the setup of our SLA I realized that one of the SLA items did not take the Status of the Case into account.   Notice the Applicable When conditions.

SLAItem

So when you try to resolve this case it fires the SLA (which is actually a workflow that runs) and sees that the Priority is High and the First Response is still set to NO and it tries to UPDATE the Case First Response By field (as defined in the Related Case Field in the SLA Item).  It of course cannot update the case because it has just been resolved so you get an error “This case has already been resolved. Close and reopen the case record to see the updates.” And the case resolution rolls back.

SOLUTION: The solution is to make sure all SLA Items have a condition for Case Status Equals Active in the Applicable When section.  Once I added the condition Case Status Equals Active, our cases will now resolve without error.

SLAItemwithActive

 

Jordan Quinn
})(jQuery)