[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.
«dicembre»
domlunmarmergiovensab
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234