Compartir a través de


Clase de RetrieveRequest

Se aplica a: CRM 2015 on-prem, CRM Online

Contains the data that is needed to retrieve a deployment entity or configuration settings record.

Espacio de nombres: Microsoft.Xrm.Sdk.Deployment
Ensamblado: Microsoft.Xrm.Sdk.Deployment (en Microsoft.Xrm.Sdk.Deployment.dll)

Sintaxis

'Declaración
<DataContractAttribute(Name:="RetrieveRequest", Namespace:="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")> _
<DebuggerStepThroughAttribute> _
<GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")> _
Public Class RetrieveRequest
    Inherits DeploymentServiceRequest
[DataContractAttribute(Name="RetrieveRequest", Namespace="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")] 
[DebuggerStepThroughAttribute] 
[GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 
public class RetrieveRequest : DeploymentServiceRequest

Ejemplo

// By instantiating the DeploymentServiceClient in a using statement you ensure that the client
// communication channel is closed and the object is disposed when it goes out of scope.

// CustomBinding_IDeploymenService is the name of the configuration setting for the CustomBinding

using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
{
             
    //The EntityIstanceId class is used to identify the object you want to
    // retrieve. You have the option of using name or ID.
    EntityInstanceId id = new EntityInstanceId
    {
        Name = "AlpineSkiHouse"
    };
    //Retrieve the organization
    Organization organization = (Organization)client.Retrieve(DeploymentEntityType.Organization, id);
             
    client.Close();
}

The following is an example of an Organization class instance serialized to XML:

<?xml version="1.0" encoding="utf-8"?>
<Organization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ExtensionData />
  <BaseCurrencyCode>USD</BaseCurrencyCode>
  <BaseCurrencyName>US Dollar</BaseCurrencyName>
  <BaseCurrencyPrecision>2</BaseCurrencyPrecision>
  <BaseCurrencySymbol>$</BaseCurrencySymbol>
  <BaseLanguageCode>1033</BaseLanguageCode>
  <DatabaseName>AlpineSkiHouse_MSCRM</DatabaseName>
  <FriendlyName>Alpine Ski House</FriendlyName>
  <Id>273c0010-5973-43d4-b666-8d899ca8c6ab</Id>
  <SqlCollation>Latin1_General_CI_AI</SqlCollation>
  <SqlServerName>CRM01</SqlServerName>
  <SqmIsEnabled>false</SqmIsEnabled>
  <SrsUrl>http://crm01/reportserver</SrsUrl>
  <State>Pending</State>
  <UniqueName>AlpineSkiHouse</UniqueName>

Comentarios

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

You can use this message to retrieve any of the valid entity types as specified by the DeploymentEntityType enumeration.

An organization deployment object has five possible states as defined by the OrganizationState enumeration.

You can also use the corresponding Windows PowerShell command for the deployment entity you want to retrieve, for example, Get-CrmOrganization or Get-CrmSetting. For more information, see Administer the deployment using Windows PowerShel.

Note that this is for the Deployment Web service. To retrieve organization data records, use RetrieveRequest.

Jerarquía heredada

System.Object
   Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
    Microsoft.Xrm.Sdk.Deployment.RetrieveRequest

Seguridad de hilo

Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para el hilo. No se garantiza que los miembros de instancia sean seguros para el hilo.

Plataformas

Plataformas de desarrollo

Windows Vista, Windows Server 2003 y

Plataformas de destino

Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Teléfono inteligente,Windows Server 2003,Windows XP Professional,Windows Vista,Windows XP

Change History

Vea también

Referencia

Miembros de RetrieveRequest
Espacio de nombres de Microsoft.Xrm.Sdk.Deployment
RetrieveResponse

Otros recursos

Use Deployment Entities and Deployment Configuration Settings

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