This did not work
SetStateRequest setState = new SetStateRequest();
setState.State = new OptionSetValue(1);
setState.Status = new OptionSetValue(5);
setState.EntityMoniker = incident.ToEntityReference();
var result = (SetStateResponse)service.Execute(setState);
So I tried to do that
https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.closeincidentrequest?view=dynamics-general-ce-9
BUT this
IncidentResolution resolution = new IncidentResolution
{
Subject = "Case Closed",
};
Causes that
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'IncidentResolution' could not be found (are you missing a using directive or an assembly reference?)
The usings are
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Ikarus.CRM.Plugins;
using Ikarus.CRM.Plugins.BusinessLogic;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Tooling.Connector;
This are the references

Why does the compiler not recognize the subclass?
EDIT: Link corrected
*This post is locked for comments
I have the same question (0)