RevokeAccessRequest 類別

Contains the data that is needed to replace the access rights on the target record for the specified security principal (user or team).

命名空間: Microsoft.Crm.Sdk.Messages
組件: Microsoft.Crm.Sdk.Proxy (在 Microsoft.Crm.Sdk.Proxy.dll 中)

語法

'宣告
<DataContractAttribute(Namespace:="https://schemas.microsoft.com/crm/2011/Contracts")> _
Public NotInheritable Class RevokeAccessRequest
    Inherits OrganizationRequest
[DataContractAttribute(Namespace="https://schemas.microsoft.com/crm/2011/Contracts")] 
public sealed class RevokeAccessRequest : OrganizationRequest

範例

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.


// Revoke access to the lead for the second user.
var revokeUser2AccessReq = new RevokeAccessRequest
{
    Revokee = systemUser2Ref,
    Target = leadReference
};

Console.WriteLine("Revoking access to the lead for {0}...\r\n",
    GetEntityReferenceString(systemUser2Ref));
_serviceProxy.Execute(revokeUser2AccessReq);

備註

Message Availability

如果要使用此訊息,呼叫端必須連線至伺服器。

Usage

Pass an instance of this class to the Execute method, which returns an instance of the RevokeAccessResponse 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 RevokeAccess Privileges.

Notes for Callers

This action also applies to all child records of the target record. However for all child records, access rights are only modified if the caller has share privileges for those entity types and share access rights to the records. As a result, the owner of the target record, or a user who shares the target record, automatically has share rights to all child records of the target record.

For a description of how actions on a parent record affect child records, see Cascading Behavior.

Supported Entities

下表顯示支援此訊息的預設實體。對於列示的實體,呼叫端必須連線至伺服器,才能使用此訊息。

Entity

Availability

Account

0 (Server)

Annotation

0 (Server)

Appointment

0 (Server)

Campaign

0 (Server)

CampaignActivity

0 (Server)

CampaignResponse

0 (Server)

Connection

0 (Server)

Contact

0 (Server)

Contract

0 (Server)

ConvertRule

0 (Server)

CustomerOpportunityRole

0 (Server)

CustomerRelationship

0 (Server)

DuplicateRule

0 (Server)

Email

0 (Server)

EmailServerProfile

0 (Server)

Entitlement

0 (Server)

Fax

0 (Server)

Goal

0 (Server)

GoalRollupQuery

0 (Server)

Import

0 (Server)

ImportFile

0 (Server)

ImportMap

0 (Server)

Incident

0 (Server)

IncidentResolution

0 (Server)

Invoice

0 (Server)

Lead

0 (Server)

Letter

0 (Server)

List

0 (Server)

Mailbox

0 (Server)

MailMergeTemplate

0 (Server)

msdyn_PostAlbum

0 (Server)

msdyn_wallsavedqueryusersettings

0 (Server)

Opportunity

0 (Server)

OpportunityClose

0 (Server)

OrderClose

0 (Server)

PhoneCall

0 (Server)

ProcessSession

0 (Server)

Queue

0 (Server)

Quote

0 (Server)

QuoteClose

0 (Server)

RecurringAppointmentMaster

0 (Server)

Report

0 (Server)

RoutingRule

0 (Server)

SalesOrder

0 (Server)

ServiceAppointment

0 (Server)

SharePointDocumentLocation

0 (Server)

SharePointSite

0 (Server)

SLA

0 (Server)

SLAKPIInstance

0 (Server)

SocialActivity

0 (Server)

SocialProfile

0 (Server)

Task

0 (Server)

Template

0 (Server)

UserForm

0 (Server)

UserQuery

0 (Server)

UserQueryVisualization

0 (Server)

Workflow

0 (Server)

繼承階層

System.Object
   Microsoft.Xrm.Sdk.OrganizationRequest
    Microsoft.Crm.Sdk.Messages.RevokeAccessRequest

執行緒安全

此類型的任何公用靜態 (Visual Basic 中的 Shared) 成員都具備執行緒安全。任何執行個體成員都不保證具備執行緒安全。

平台

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008、Windows Server 2012、Windows 7

Change History

請參閱

參照

RevokeAccessRequest 成員
Microsoft.Crm.Sdk.Messages 命名空間
Actions on Entity Records
RevokeAccessResponse

其他資源

How Record-Based Security Can Be Used to Control Access to Records In Microsoft Dynamics CRM
Sample: Share Records Using GrantAccess, ModifyAccess and RevokeAccess Messages

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.