Hi Experts,
I need one help. I am trying to close case using C# code.
Code:
public static void CloseCase(IOrganizationService orgService, EntityReference incidentRef)
{
IncidentResolution incidentResolution = new IncidentResolution();
incidentResolution.IncidentId = incidentRef;
incidentResolution.Subject = "Sagar Close";
CloseIncidentRequest closeIncidentRequest = new CloseIncidentRequest()
{
IncidentResolution = incidentResolution,
//// Closed
Status = new OptionSetValue(100000004)
};
CloseIncidentResponse response = (CloseIncidentResponse)orgService.Execute(closeIncidentRequest);
}
Every request is getting failed. Error says that "This case has already been resolved. Close and reopen the case record to see the updates."
I checked on CRM UI. That Case is still open.
And 100000004 is for status "Closed" which is for Resolved Case State.
Am I missing anything here ?
Thank you in advance.
*This post is locked for comments
I have the same question (0)