UpdateRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the data that is needed to update a deployment record.
public ref class UpdateRequest : Microsoft::Xrm::Sdk::Deployment::DeploymentServiceRequest
[System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")]
[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.Serialization.DataContract(Name="UpdateRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
public class UpdateRequest : Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
[<System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")>]
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Runtime.Serialization.DataContract(Name="UpdateRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>]
type UpdateRequest = class
inherit DeploymentServiceRequest
Public Class UpdateRequest
Inherits DeploymentServiceRequest
- Inheritance
- Attributes
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();
}
Remarks
Pass an instance of this class to the Execute(DeploymentServiceRequest) 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.
Constructors
UpdateRequest() |
Initializes a new instance of the UpdateRequest class. |
Properties
Entity |
Gets or sets the configuration entity to be updated. |
ExtensionData |
Gets or sets the structure that contains extra data. (Inherited from DeploymentServiceRequest) |