Quantcast
Viewing all articles
Browse latest Browse all 25

Resolve case programmatically

You have to create incidentresolution entity object and also then execute a CloseIncidentRequest, sample code looks like this:

incidentresolution objJobResolution = new incidentresolution();
objJobResolution.incidentid = new Lookup();
objJobResolution.incidentid.type = "incident";
objJobResolution.incidentid.Value = ; // Job id
objJobResolution.subject = "subject";

try
{
objCrmService.Create(objJobResolution);

CloseIncidentRequest closeJob = new CloseIncidentRequest();
closeJob.IncidentResolution = objJobResolution;
closeJob.Status = 5;

CloseIncidentResponse resp = (CloseIncidentResponse)objCrmService.Execute(closeJob);

}
catch (System.Web.Services.Protocols.SoapException soapEx)
{
continue;
}

Viewing all articles
Browse latest Browse all 25

Trending Articles