BeginCreateOrganizationRequest Class

Definition

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

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

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;

            }

Remarks

Usage

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

Notes for Callers

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

You can use the Get-CrmOperationStatusWindows 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.

Constructors

BeginCreateOrganizationRequest()

Initializes a new instance of the BeginCreateOrganizationRequest class.

Properties

ExtensionData

Gets or sets the structure that contains extra data.

(Inherited from DeploymentServiceRequest)
Organization

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

SysAdminName

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

Applies to

See also