Hello, I'm trying to re-activate an incident so I can update a field value. I'm using the following code:
SetStateRequest req = new SetStateRequest();
req.EntityMoniker = new EntityReference(incident.LogicalName, incident.Id);
req.State = new OptionSetValue(0);
req.Status = new OptionSetValue(-1); //5 is not a valid status code for state code IncidentState.Active on incident
//req.Status = new OptionSetValue(0); //0 is not a valid status code on incident.
//req.Status = new OptionSetValue(1); //5 is not a valid status code for state code IncidentState.Active on incident.
//req.Status = new OptionSetValue(2); //5 is not a valid status code for state code IncidentState.Active on incident.
//req.Status = new OptionSetValue(3); //5 is not a valid status code for state code IncidentState.Active on incident.
orgService.Execute(req);
As you can see from my inline comments above, I'm having problems setting the Status value. For practical purposes, it doesn't matter what I set the value to because my code is going to revert the status back to Active after the update. Any idea
what the issue might be?