Hi All,
We have plugin register on Case entity with post operation, wherein we have condition that while saving the case record close the case automatically, below is the code snippet;
We are upgrading our CRM from CRM 2011 to CRM 2016. The same line of code got executed in CRM 2011, CRM 2013 and CRM 2015, but its throwing ID does not exist error in CRM 2016. Could you please help me here.
Entity caseResolution = new Entity();
caseResolution.LogicalName = "incidentresolution";
caseResolution.Id = Guid.Empty;
caseResolution["incidentid"] = new EntityReference() { Id = incidentId, LogicalName = "incident" };
caseResolution["subject"] = title;
caseResolution["actualend"] = DateTime.UtcNow;
OrganizationRequest request = new OrganizationRequest() { RequestName = "CloseIncident" };
request["IncidentResolution"] = caseResolution;
request["Status"] = new OptionSetValue() { Value = 950000015 }; //950000015=Submitted
service.Execute(request);
Regards,
Rahul
*This post is locked for comments