locked
closeincidentrequest throwing null ref error? RRS feed

  • Question

  • Hello, I'm currently using the following code to try to set a request to Resolved:

           private void SetResolved(IOrganizationService orgService, Entity incident, int statusCode)
           {
               var incidentResolution = new IncidentResolution
               {
                   Subject = "Resolved Sample Incident",
                   IncidentId = new EntityReference(incident.LogicalName, incident.Id)
               };

               // Close the incident with the resolution.
               var closeIncidentRequest = new CloseIncidentRequest
               {
                   IncidentResolution = incidentResolution,
                   Status = new OptionSetValue(5) //ProblemSolved
               };
               orgService.Execute(closeIncidentRequest);
           }

    However, orgService.Execute throws the following exception: "{"Value cannot be null.\r\nParameter name: value"}.  I traversed through the exception properties but could not find any meaningful details.  Any idea what might be missing here or how to debug?

    Sunday, January 5, 2014 9:01 PM

Answers

All replies