I'm trying to Close case with "CANCELED" status. If i wrote "5" for changeIncidentStatusRequest.Status it's succesfully Closing case with "RESOLVED" but when i wrote 6 ( Canceled status code) i get this exception :
" 6 is not a valid status code for state
Entity resolution = new Entity("incidentresolution");
resolution["subject"] = "Incident Closed";
resolution["incidentid"] = incident;
CloseIncidentRequest closeRequest = new CloseIncidentRequest();
closeRequest.IncidentResolution = resolution;
closeRequest.Status = new OptionSetValue(6);
CloseIncidentResponse closeResponse = (CloseIncidentResponse)service.Execute(closeRequest);
Please help...
*This post is locked for comments