public void InactiveAccountStatus(Guid memberId) { SetStateRequest setStateRequest = new SetStateRequest() { EntityMoniker = new EntityReference { Id = memberId, Name = "Account", LogicalName = Account.EntityLogicalName }, State = new OptionSetValue(AccountState.Inactive), Status = new OptionSetValue(2) }; accountService.ServiceProxy.Execute(setStateRequest); } }
Following table contain the status values
LogicalName | Type | OptionValue | OptionDescription |
statecode | State | 0 | Open |
State | 1 | Closed | |
State | 2 | Canceled | |
State | 3 | Scheduled |
0 comments:
Post a Comment