Friday, May 4, 2012

MS CRM 4.0 plug-in update of email statuscode

SetStateEmailRequest request = new SetStateEmailRequest();
request.EntityId = new Guid(context.InputParameters.Properties["EmailId"]+"");
request.EmailState = EmailState.Completed;
request.EmailStatus = 3;
ICrmService service = context.CreateCrmService(true); // this is the services getting form context as its from plugin code, other way you ca create the service...
      service.Execute( request );

No comments:

Post a Comment