Споделяне чрез


GrantAccessRequest Class

Definition

Contains the data that is needed to grant a security principal (user, team, or organization) access to the specified record.

public ref class GrantAccessRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class GrantAccessRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type GrantAccessRequest = class
    inherit OrganizationRequest
Public NotInheritable Class GrantAccessRequest
Inherits OrganizationRequest
Inheritance
GrantAccessRequest
Attributes

Examples

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 instance. For the complete sample, see the link later in this topic.

Remarks

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the GrantAccessResponse class.

Privileges and Access Rights

To perform this action, the caller must have privileges on the specified entity in the Target property and access rights on the specified record in the Target property. For a list of the required privileges, see GrantAccess message privileges.

Notes for Callers

This action applies to all child records of the target 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 instance, or a user who shares the instance with share rights, automatically has share rights to all child records of the target record. In this case, only the lack of privileges for a particular entity type prevents the child records from being shared.

For a description of how actions on a parent record can affect related records, see Configure table relationship cascading behavior.

Supported Tables

See Message support for tables for an example query you can use to get the list of tables you can use with the GrantAccess message.

Constructors

GrantAccessRequest()

Initializes a new instance of the GrantAccessRequest class.

Properties

ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
PrincipalAccess

Gets or sets the team or user that is granted access to the specified record. Required.

RequestId

Gets or sets the ID of the request. Optional.

(Inherited from OrganizationRequest)
RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
Target

Gets or sets the entity that is the target of the request to grant access. Required.

Applies to

See also