MS CRM2011 共享客户权限
MS CRM2011 共享客户权限给用户
GrantAccessRequest grantRequest = new GrantAccessRequest()
{
Target = new EntityReference("account", new Guid(ids)),//要共享的对象,此处为客户
PrincipalAccess = new PrincipalAccess()
{
Principal = new EntityReference("systemuser", new Guid(manage)),//共享给某个用户
AccessMask = AccessRights.WriteAccess | AccessRights.ReadAccess//共享读写权限
}
};
GrantAccessResponse grantResponse = (GrantAccessResponse)method.Execute(grantRequest);//执行