RetrieveSharedPrincipalsAndAccessRequest 类
应用到: CRM 2015 on-prem, CRM Online
Contains the data that is needed to retrieve all security principals (users or teams) that have access to, and access rights for, the specified record.
命名空间: 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 RetrieveSharedPrincipalsAndAccessRequest
Inherits OrganizationRequest
[DataContractAttribute(Namespace="https://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class RetrieveSharedPrincipalsAndAccessRequest : 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.
var accessRequest = new RetrieveSharedPrincipalsAndAccessRequest
{
Target = leadReference
};
// The RetrieveSharedPrincipalsAndAccessResponse returns an entity reference
// that has a LogicalName of "user" when returning access information for a
// "team."
var accessResponse = (RetrieveSharedPrincipalsAndAccessResponse)
_serviceProxy.Execute(accessRequest);
Console.WriteLine("The following have the specified granted access to the lead.");
foreach (var principalAccess in accessResponse.PrincipalAccesses)
{
Console.WriteLine("\t{0}:\r\n\t\t{1}",
GetEntityReferenceString(principalAccess.Principal),
principalAccess.AccessMask);
}
Console.WriteLine();
备注
Message Availability
无论调用方是连接到服务器还是处于脱机状态,此消息都可正常工作。 However, a few entities of this message class are exceptions to that availability. To determine which entities have a more restricted availability, see Supported Entities later in this topic.
Usage
将此类的实例传递给 Execute method, which returns an instance of the RetrieveSharedPrincipalsAndAccessResponse class.
Privileges and Access Rights
To perform this action, the caller must have the privileges on the specified entity in the Target property and access rights on the specified record in the Target property. For a complete list of the required privileges, see the topic RetrieveSharedPrincipalsAndAccess Privileges.
Supported Entities
下表显示支持此消息的默认实体。对于此消息的列出实体,如果调用方必须连接到服务器,则“可用性”列显示“Server”;如果调用方可连接到服务器也可以从服务器断开连接,则显示“Both”。
Entity | Availability |
---|---|
Account |
2 (Both) |
Annotation |
2 (Both) |
Appointment |
2 (Both) |
Campaign |
2 (Both) |
CampaignActivity |
2 (Both) |
CampaignResponse |
2 (Both) |
Connection |
2 (Both) |
Contact |
2 (Both) |
Contract |
2 (Both) |
ConvertRule |
2 (Both) |
CustomerOpportunityRole |
2 (Both) |
CustomerRelationship |
2 (Both) |
DuplicateRule |
2 (Both) |
2 (Both) |
|
EmailServerProfile |
2 (Both) |
Entitlement |
2 (Both) |
Fax |
2 (Both) |
Goal |
2 (Both) |
GoalRollupQuery |
2 (Both) |
Import |
2 (Both) |
ImportFile |
2 (Both) |
ImportMap |
2 (Both) |
Incident |
2 (Both) |
IncidentResolution |
2 (Both) |
Invoice |
2 (Both) |
Lead |
2 (Both) |
Letter |
2 (Both) |
List |
2 (Both) |
Mailbox |
2 (Both) |
MailMergeTemplate |
2 (Both) |
msdyn_PostAlbum |
2 (Both) |
msdyn_wallsavedqueryusersettings |
2 (Both) |
Opportunity |
2 (Both) |
OpportunityClose |
2 (Both) |
OrderClose |
2 (Both) |
PhoneCall |
2 (Both) |
ProcessSession |
2 (Both) |
Queue |
2 (Both) |
Quote |
2 (Both) |
QuoteClose |
2 (Both) |
RecurringAppointmentMaster |
2 (Both) |
Report |
2 (Both) |
RoutingRule |
2 (Both) |
SalesOrder |
2 (Both) |
ServiceAppointment |
2 (Both) |
SharePointDocumentLocation |
2 (Both) |
SharePointSite |
2 (Both) |
SLA |
2 (Both) |
SLAKPIInstance |
2 (Both) |
SocialActivity |
2 (Both) |
SocialProfile |
2 (Both) |
Task |
2 (Both) |
Template |
2 (Both) |
UserForm |
2 (Both) |
UserQuery |
2 (Both) |
UserQueryVisualization |
2 (Both) |
Workflow |
2 (Both) |
继承层次结构
System.Object
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Crm.Sdk.Messages.RetrieveSharedPrincipalsAndAccessRequest
线程安全性
此类型的所有公共静态(Visual Basic 中的 Shared)成员都是线程安全成员。不保证任何实例成员是线程安全成员。
平台
开发平台
Windows Vista、Windows Server 2003 和
目标平台
Windows Vista,Windows XP
Change History
另请参阅
参考
RetrieveSharedPrincipalsAndAccessRequest 成员
Microsoft.Crm.Sdk.Messages 命名空间
Entity Ownership
RetrieveSharedPrincipalsAndAccessResponse
其他资源
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.
© 2014 Microsoft Corporation. All rights reserved.