UpdateRequest Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Contains the data that is needed to update a deployment 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.UpdateRequest

Syntax

[DataContractAttribute(Name = "UpdateRequest", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
public class UpdateRequest : DeploymentServiceRequest
<DataContractAttribute(Name := "UpdateRequest", Namespace := "http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>
Public Class UpdateRequest
    Inherits DeploymentServiceRequest

Constructors

Name Description
System_CAPS_pubmethod UpdateRequest()

Initializes a new instance of the UpdateRequest class.

Properties

Name Description
System_CAPS_pubproperty Entity

Gets or sets the configuration entity to be updated.

System_CAPS_pubproperty ExtensionData

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

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

You can also use the corresponding Windows PowerShell command for the deployment entity you want to update. For example, Set-CrmProductKey or Set-CrmSetting. For more information, see Administer the deployment using Windows PowerShell.

Note that this is for the Deployment Web service. To update organization data records use UpdateRequest.

Examples

The following code shows how to disable an organization.

using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
{
    EntityInstanceId id = new EntityInstanceId
    {
        Name = "AlpineSkiHouse"
    };

    Organization organization = (Organization)client.Retrieve(DeploymentEntityType.Organization, id);
    organization.State = OrganizationState.Disabled;
    client.Update(organization);

    client.Close();
}

The following code shows how to enable an organization.

using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
{
    EntityInstanceId id = new EntityInstanceId
    {
        Name = "AlpineSkiHouse"
    };


    Organization organization = (Organization)client.Retrieve(DeploymentEntityType.Organization, id);
    organization.State = OrganizationState.Enabled;
    client.Update(organization);


    client.Close();
}

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

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

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright