I am aware of the early bound solution:
var incidentResolution = new IncidentResolution
{
Subject = caseproblemsolutionText,
IncidentId = new EntityReference(Incident.EntityLogicalName, incident.Attributes["incidentid"])
};
// Close the incident with the resolution.
var closeIncidentRequest = new CloseIncidentRequest
{
IncidentResolution = incidentResolution,
Status = new OptionSetValue((int) incident_statuscode.ProblemSolved)
};
service.Execute(closeIncidentRequest);
Is there any other way of changing statecode of incident using plugin without needing to generate IncidentResolution class using CrmSvcUtil.exe tool.






