ModifyAccessRequest Class
Contains the data that is needed to replace the access rights on the target record for the specified security principal (user or team). Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.
// Grant the first user delete access to the lead. var modifyUser1AccessReq = new ModifyAccessRequest { PrincipalAccess = new PrincipalAccess { AccessMask = AccessRights.DeleteAccess, Principal = systemUser1Ref }, Target = leadReference }; Console.WriteLine("Granting delete access to {0} on the lead...\r\n", GetEntityReferenceString(systemUser1Ref)); _serviceProxy.Execute(modifyUser1AccessReq);
Message Availability
For this message to work, the caller must be connected to the server.
Usage
Pass an instance of this class to the Execute method, which returns an instance of the ModifyAccessResponse class.
Privileges and Access Rights
To perform this action, the caller must have privileges on the entity that is specified in the Target property and access rights on the record that is specified in the Target property. For a list of the required privileges, see ModifyAccess Privileges.
Notes for Callers
This action applies to all child records of the target entity record. For all child records, if the caller does not have share privileges for those entity types or share rights to the records, the child records are not shared. As a result, the owner of the entity record, or a user who shares the record that has share rights, automatically has share rights to all child records of the target entity record. In this case, only the lack of privileges to a particular entity type prevents the child records from being shared.
For a description of how actions on a parent record affect child records, see Cascading Behavior.
Supported Entities
The following table shows the default entities that support this message. For the listed entities, the caller must be connected to the server for this message to be available.
| Entity |
|---|
account |
annotation |
appointment |
campaign |
campaignactivity |
campaignresponse |
connection |
contact |
contract |
customeropportunityrole |
customerrelationship |
duplicaterule |
fax |
goal |
goalrollupquery |
import |
importfile |
importmap |
incident |
incidentresolution |
invoice |
lead |
letter |
list |
mailmergetemplate |
opportunity |
opportunityclose |
orderclose |
phonecall |
processsession |
queue |
quote |
quoteclose |
recurringappointmentmaster |
report |
salesorder |
serviceappointment |
sharepointdocumentlocation |
sharepointsite |
task |
template |
userform |
userquery |
userqueryvisualization |
workflow |
Development Platforms
Windows Server 2008Target Platforms
Windows Server 2008, Windows 7 (All Versions), Windows Vista (All Versions)Reference
ModifyAccessRequest MembersMicrosoft.Crm.Sdk.Messages Namespace
Actions on Entity Records
ModifyAccessResponse
Other Resources
How Record-Based Security Can Be Used to Control Access to Records in Microsoft Dynamics CRMSample: Share Records Using GrantAccess, ModifyAccess and RevokeAccess Messages
Send comments about this topic to Microsoft.
© 2011 Microsoft Corporation. All rights reserved.