[CRM] Share di un systemuser/team ad un account

CrmService service = new CrmService();
service.Credentials = ......passare credenziali di amministratore

SecurityPrincipal principal = new SecurityPrincipal();
principal.Type = principalType;
principal.PrincipalId = entityId; //guid del team o systemuser

PrincipalAccess principalAccess = new PrincipalAccess();
principalAccess.Principal = principal;

principalAccess.AccessMask = AccessRights.ReadAccess | AccessRights.WriteAccess; //tipi di accesso
TargetOwnedAccount target = new TargetOwnedAccount();
target.EntityId = accountId;

ModifyAccessRequest request = new ModifyAccessRequest();
request.PrincipalAccess = principalAccess;
request.Target = target;
service.Execute(request);

posted @ martedì 15 maggio 2007 12:28

Print

Comments on this entry:

# re: [CRM] Share di un systemuser/team ad un account

Left by he at 13/11/2014 17:49
Gravatar
computing platform networks check your credit score divergence sharply ebbs and flows credit report scores appeal rolling out 5497
Comments have been closed on this topic.
«gennaio»
domlunmarmergiovensab
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456