Updating Resolved Cases in Dynamics 365

Some Dynamics 365/CRM record updates need specific workarounds. Due to various reasons such as adding new fields to case entity, option set changes, migrating data to some other environments etc… developers need to modify the case records including resolved cases. This post is to explain a workaround for updating and migrating Resolved Case records.

Get resolved cases using views or advanced find.

1

Export all the resolved case records using Excel Online.

2

3

Change the Status and Status Reason to any active status as follows. Save the changes and send the updates to Dynamics.

4

All the updates are sent as Data Import job and it is shown under Settings >> Data Management.

5

6

After changing Status\Status Reason, then Export them again and Update the fields needed.

11

Save the changes and send them to Dynamics through another data import job.

12

As Status and Status Reason have been changed to an active status, now those records need to be converted back to the Resolved status. This can be done from the CRM front end and Programmatically as well. Each case record needs a Resolution Reason during its Resolve process.

  • Resolving the case from the CRM Front End

14

  • Resolving the case using Code

EntityReference caseEntityReference = new EntityReference(“incident”, _caseIncidentId);
// First close the Incident

// Create resolution for the closing incident
IncidentResolution incidentRresolution = new IncidentResolution
{
Subject = “Re Resolution Test”,
};

incidentRresolution.IncidentId = caseEntityReference;

// Create the request to close the incident, and set its resolution to the resolution created above
CloseIncidentRequest closeIncidentRequest = new CloseIncidentRequest();
closeIncidentRequest.IncidentResolution = incidentRresolution;

// Set the requested new status for the closed Incident
closeIncidentRequest.Status = new OptionSetValue(5 /*ProblemSolved*/);

// Execute the close request
CloseIncidentResponse closeIncidentResponse = (CloseIncidentResponse)_service.Execute(closeIncidentRequest);
Console.WriteLine(“Incident Closed”);
}

This is how Dynamics 365/CRM shows after the update process.

Author: Indika Abayarathne

MSc in IT [University of Colombo] Solutions Architect | Consultant Technologies: Power Platform | Dynamics CE | Azure

One thought on “Updating Resolved Cases in Dynamics 365”

Leave a comment