I have an issue with setting the accessrights for a principal in CRM. I have to retrieve the actual access rights for a particular team set these rights.
Actually the accessrights are set like this:
principal.AccessMask = Microsoft.Crm.Sdk.Messages.AccessRights.ReadAccess | Microsoft.Crm.Sdk.Messages.AccessRights.AppendAccess |
Microsoft.Crm.Sdk.Messages.AccessRights.AppendToAccess |
Microsoft.Crm.Sdk.Messages.AccessRights.WriteAccess;
Now I have retrieved the relevant accessrights which is returned as object:
object AccessRights = FetchEngine.GetPrincipalPriviliges(Globals.incomingTeamId, Globals.incomingRecordId);
This object contains the rights like this: 851991
My issue now is that I don't know exactly how to set the AccessRights for the principal by using this object (bitmask).
Maybe somebody can point me in the right direction.
Any help is very appreciated.
Kind regards Sandro