Share via


BeginCreateOrganizationRequest Class

 

Applies To: Dynamics CRM 2015

Contains the data that is needed to initiate the asynchronous operation to create an organization.

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.DeferredOperationRequest
      Microsoft.Xrm.Sdk.Deployment.BeginCreateOrganizationRequest

Syntax

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

Constructors

Name Description
System_CAPS_pubmethod BeginCreateOrganizationRequest()

Initializes a new instance of the BeginCreateOrganizationRequest class.

Properties

Name Description
System_CAPS_pubproperty ExtensionData

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

System_CAPS_pubproperty Organization

Gets or sets the organization instance to be created. Required.

System_CAPS_pubproperty SysAdminName

Gets or sets the name of the system administrator for the new organization. Required.

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

Usage

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

Notes for Callers

You can also use the New-CrmOrganization Windows PowerShell command. For more information, see Administer the deployment using Windows PowerShell.

You can use the Get-CrmOperationStatus Windows PowerShell command to check the status of this asynchronous request. Or, you can use the RetrieveRequest message using the OperationId property to set the InstanceTag property.

Examples

Guid operationId = Guid.Empty;
            // instantiating the DeploymentServiceClient in a using statement ensures that the client
            // communication channel is closed and the object is disposed when falling out of scope.

            // CustomBinding_IDeploymenService is the name of the configuration setting for the CustomBinding
            using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
            {
                // Set properties for the new organization
                Organization organization = new Organization
                {
                    BaseCurrencyCode = "USD",
                    BaseCurrencyName = "US Dollar",
                    BaseCurrencyPrecision = 2,
                    BaseCurrencySymbol = "$",
                    BaseLanguageCode = 1033,
                    FriendlyName = "Alpine Ski House",
                    UniqueName = "AlpineSkiHouse",
                    SqlCollation = "Latin1_General_CI_AI",
                    SqlServerName = "CRM01",
                    SrsUrl = "http://CRM01/ReportServer",
                    SqmIsEnabled = false
                };

                // Create a request for the deployment service
                BeginCreateOrganizationRequest request = new BeginCreateOrganizationRequest();
                request.Organization = organization;

                // Execute the request
                BeginCreateOrganizationResponse response = (BeginCreateOrganizationResponse)client.Execute(request);

                // The operation is asynchronous, so the response object contains a unique identifier
                // for the operation
                operationId = response.OperationId;

            }

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

BeginCreateOrganizationResponse
Microsoft.Xrm.Sdk.Deployment Namespace
New-CrmOrganization
Get-CrmOperationStatus

Return to top

© 2016 Microsoft. All rights reserved. Copyright