Tuesday, 26 May 2015

Reactivate a case using C# in CRM 2011/2013/2015

Hi,

Many times we get the requirement to reactivate a case using C# in Plugin/Workflow/Some App,

Here is the code of it.

try
{
   SetStateRequest req = new SetStateRequest();
   req.EntityMoniker = new EntityReference(entityName, entityGuid);
   req.State = new OptionSetValue(state);
   req.Status = new OptionSetValue(status);
   orgService.Execute(req);
}
catch (Exception ex)
{


}

Hope it helps.

--
Happy CRM'ing
Gopinath.

1 comment:

  1. Iam really satisfy by your information. It's well-written, to the point, and relative to what I do. I like it very much for giving information on. I hope you can continue and post more.
    Microsoft Dynamics CRM Online Training | AX Training

    ReplyDelete