Hi,
To get the id of the case record which is getting resolved in the plugin, we need to make use of IncidentResolution inputparameters of the context.
Entity incRes = this.Context.InputParameters["IncidentResolution"] as Entity; Guid caseId = ((EntityReference)incRes.Attributes["incidentid"]).Id;
Bye.
hi! i am having a problem on resolving a case using retrieved guid from crm 2011. do u know any solutions? please advice me, thanks.
here is my code:
Entity caseResolution = new Entity(“incidentresolution”);
Guid caseId = (Guid)entity.Attributes[“incidentid”];
caseResolution[“incidentid”] = new EntityReference(“incident”, caseId);
caseResolution[“subject”] = “Resolved!”;
CloseIncidentRequest close = new CloseIncidentRequest();
close.IncidentResolution = caseResolution;
close.RequestName = “CloseIncident”;
close.Status = new OptionSetValue(5);
CloseIncidentResponse closeCase =
(CloseIncidentResponse)service.Execute(close);
LikeLike