[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.
«settembre»
domlunmarmergiovensab
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789