Thursday, January 20, 2011

Set Status Inactive in CRM - Entity Using C#

// Create the Request Object
          SetStateAccountRequest state = new SetStateAccountRequest();
           //// Set the Request Object's Properties
          state.AccountState = AccountState.Inactive;
           state.AccountStatus = 2;
           state.EntityId = account.accountid.Value;

            service.ExecuteCompleted += new EventHandler(service_UpdateMemberStatus);
          service.ExecuteAsync(state);

No comments:

Post a Comment