20 Şubat 2010 Cumartesi

Set the State/Status of A Custom Entity in CRM 4.0

SetStateDynamicEntityRequest stateReq = new SetStateDynamicEntityRequest();

stateReq.Entity = new Moniker();

stateReq.Entity.Id = new Guid("The GUID of your Entity instance here");
stateReq.Entity.Name = "your entity Name here";

//Set to Inactive
stateReq.State = "inactive";
stateReq.Status = -1;

//Set to Active
//stateReq.State = "active";
//stateReq.Status = 1;

SetStateDynamicEntityResponse stateSet = SetStateDynamicEntityResponse)crmService.Execute(stateReq);

Hiç yorum yok: