RetrieveRequest Class

 

Applies To: Dynamics CRM 2015

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

Namespace:   Microsoft.Xrm.Sdk.Deployment
Assembly:  Microsoft.Xrm.Sdk.Deployment (in Microsoft.Xrm.Sdk.Deployment.dll)

Inheritance Hierarchy

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

Syntax

[DataContractAttribute(Name = "RetrieveRequest", Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
public class RetrieveRequest : DeploymentServiceRequest
[DataContractAttribute(Name = "RetrieveRequest", Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
public ref class RetrieveRequest : DeploymentServiceRequest
[<DataContractAttribute(Name = "RetrieveRequest", Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>]
type RetrieveRequest = 
    class
        inherit DeploymentServiceRequest
    end
<DataContractAttribute(Name := "RetrieveRequest", Namespace := "https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>
Public Class RetrieveRequest
    Inherits DeploymentServiceRequest

Constructors

Name Description
System_CAPS_pubmethod RetrieveRequest()

Initializes a new instance of the RetrieveRequest class.

Properties

Name Description
System_CAPS_pubproperty EntityType

Gets or sets the type of deployment entity to be retrieved.

System_CAPS_pubproperty ExtensionData

Gets or sets the structure that contains extra data.(Inherited from DeploymentServiceRequest.)

System_CAPS_pubproperty InstanceTag

Gets or sets the ID or instance tag of the deployment record to be retrieved.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

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 PowerShell.

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

Examples

// 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>

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

RetrieveResponse
Microsoft.Xrm.Sdk.Deployment Namespace
Deployment entities and deployment configuration settings
Administer the deployment using Windows PowerShell

Return to top

© 2016 Microsoft. All rights reserved. Copyright