This C# code will set the Parent System User(Manager) of specified System User.
Note: The specified System User and Parent System User must belongs to same Business Unit.
using Microsoft.Crm.Sdk.Messages;
SetParentSystemUserRequest parentUserRequest = new SetParentSystemUserRequest()
SetParentSystemUserRequest parentUserRequest = new SetParentSystemUserRequest()
{
ParentId = new Guid(managerId.ToString()),
UserId = new Guid(userId.ToString()),
};
SetParentSystemUserResponse parentUserResponse = (SetParentSystemUserResponse)service.Execute(parentUserRequest);
No comments:
Post a Comment