RetrieveRequest Class

Definition

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

public ref class RetrieveRequest : Microsoft::Xrm::Sdk::Deployment::DeploymentServiceRequest
[System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")]
[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.Serialization.DataContract(Name="RetrieveRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
public class RetrieveRequest : Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
[<System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")>]
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Runtime.Serialization.DataContract(Name="RetrieveRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>]
type RetrieveRequest = class
    inherit DeploymentServiceRequest
Public Class RetrieveRequest
Inherits DeploymentServiceRequest
Inheritance
Attributes

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();
}
  <p>The following is an example of an Organization class instance serialized to XML:</p>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;Organization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;  &lt;ExtensionData /&gt;  &lt;BaseCurrencyCode&gt;USD&lt;/BaseCurrencyCode&gt;  &lt;BaseCurrencyName&gt;US Dollar&lt;/BaseCurrencyName&gt;  &lt;BaseCurrencyPrecision&gt;2&lt;/BaseCurrencyPrecision&gt;  &lt;BaseCurrencySymbol&gt;$&lt;/BaseCurrencySymbol&gt;  &lt;BaseLanguageCode&gt;1033&lt;/BaseLanguageCode&gt;  &lt;DatabaseName&gt;AlpineSkiHouse_MSCRM&lt;/DatabaseName&gt;  &lt;FriendlyName&gt;Alpine Ski House&lt;/FriendlyName&gt;  &lt;Id&gt;273c0010-5973-43d4-b666-8d899ca8c6ab&lt;/Id&gt;  &lt;SqlCollation&gt;Latin1_General_CI_AI&lt;/SqlCollation&gt;  &lt;SqlServerName&gt;CRM01&lt;/SqlServerName&gt;  &lt;SqmIsEnabled&gt;false&lt;/SqmIsEnabled&gt;  &lt;SrsUrl&gt;http://crm01/reportserver&lt;/SrsUrl&gt;  &lt;State&gt;Pending&lt;/State&gt;  &lt;UniqueName&gt;AlpineSkiHouse&lt;/UniqueName&gt;

Remarks

Pass an instance of this class to the Execute(DeploymentServiceRequest) 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.

Constructors

RetrieveRequest()

Initializes a new instance of the RetrieveRequest class.

Properties

EntityType

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

ExtensionData

Gets or sets the structure that contains extra data.

(Inherited from DeploymentServiceRequest)
InstanceTag

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

Applies to

See also