Classe AddPrivilegesRoleRequest

Aplica-se a: CRM 2015 on-prem, CRM Online

Contains the data that is needed to add a set of existing privileges to an existing role.

Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (em Microsoft.Crm.Sdk.Proxy.dll)

Sintaxe

'Declaração
<DataContractAttribute(Namespace:="https://schemas.microsoft.com/crm/2011/Contracts")> _
Public NotInheritable Class AddPrivilegesRoleRequest
    Inherits OrganizationRequest
[DataContractAttribute(Namespace="https://schemas.microsoft.com/crm/2011/Contracts")] 
public sealed class AddPrivilegesRoleRequest : OrganizationRequest

Exemplo

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 IOrganizationServiceinterface. Para obter o exemplo completo, consulte o link mais adiante neste tópico.

// Add the prvReadAccount privilege to the example roles to assure the
// team can read accounts.
AddPrivilegesRoleRequest addPrivilegesRequest = new AddPrivilegesRoleRequest
{
    RoleId = _roleId,
    Privileges = new[] 
    {
        // Grant prvReadAccount privilege.
        new RolePrivilege
        { 
            PrivilegeId = readAccountPrivilege.Id 
        }
    }
};
_service.Execute(addPrivilegesRequest);

Comentários

Message Availability

Para que esta mensagem funcione, o chamador deve estar conectado ao servidor.

Usage

Pass an instance of this class to the Execute method, which returns an instance of the AddPrivilegesRoleResponse class.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Role entity and access rights on the specified record in the RoleId property. For a complete list of the required privileges, see AddPrivilegesRole Privileges.

Hierarquia de Herança

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

Segurança do Thread

Todos os membros estáticos (Shared in Visual Basic) desse tipo são protegidos por thread. Não há nenhum garantia de que os membros de instância sejam protegidos por thread.

Plataformas

Plataformas de desenvolvimento

Windows Vista, Windows Server 2003 e

Plataformas de destino

Windows Vista,Windows XP

Change History

Consulte também

Referência

Membros de AddPrivilegesRoleRequest
Namespace Microsoft.Crm.Sdk.Messages
AddPrivilegesRoleResponse

Outros recursos

Privilege and Role Entities
Role Entity Messages and Methods
Privilege Entity Messages and Methods
Sample: Assign a Record to a Team
AddPrivilegesRole Privileges

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