public static bool SetStateRequestFunc(IOrganizationService crmService, string entityname, Guid entityid, int state, int statusreason)
{
try
{
SetStateRequest open = new SetStateRequest
{
EntityMoniker = new EntityReference(entityname, entityid),
State = new OptionSetValue(state),
Status = new OptionSetValue(statusreason)
};
SetStateResponse resp = (SetStateResponse)crmService.Execute(open);
return true;
}
catch (Exception ex)
{
throw ex;
}
}
Hiç yorum yok:
Yorum Gönder