UpdateRequest Class
[Applies to: Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online]
Assembly: Microsoft.Xrm.Sdk.Deployment (in Microsoft.Xrm.Sdk.Deployment.dll)
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)
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(); }
Pass an instance of this class to the Execute method, which returns an instance of UpdateResponse.
You can also use the correspondingWindows PowerShell command for the deployment entity you want to update. For example, Set-CrmOrganization or Set-CrmSetting. For more information, seeUse PowerShell to Call the Deployment Web Service.
Note that this is for the Deployment Web service. To update organization data records use UpdateRequest.
System.Object
Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
Microsoft.Xrm.Sdk.Deployment.UpdateRequest
Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
Microsoft.Xrm.Sdk.Deployment.UpdateRequest
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Development Platforms
Windows Server 2008Target Platforms
Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Smart Phone,Windows Server 2003,Windows XP Professional,Windows Server 2008, Windows 7 (All Versions), Windows Vista (All Versions)Send comments about this topic to Microsoft.
© 2011 Microsoft Corporation. All rights reserved.