Compartir a través de


Clase de UpdateRequest

Se aplica a: CRM 2015 on-prem, CRM Online

Contains the data that is needed to update a deployment record.

Espacio de nombres: Microsoft.Xrm.Sdk.Deployment
Ensamblado: Microsoft.Xrm.Sdk.Deployment (en Microsoft.Xrm.Sdk.Deployment.dll)

Sintaxis

'Declaración
<DebuggerStepThroughAttribute> _
<DataContractAttribute(Name:="UpdateRequest", Namespace:="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")> _
<GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")> _
Public Class UpdateRequest
    Inherits DeploymentServiceRequest
[DebuggerStepThroughAttribute] 
[DataContractAttribute(Name="UpdateRequest", Namespace="https://schemas.microsoft.com/xrm/2011/Contracts/Deployment")] 
[GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 
public class UpdateRequest : DeploymentServiceRequest

Ejemplo

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();
}

Comentarios

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, see Administer the deployment using Windows PowerShel.

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

Jerarquía heredada

System.Object
   Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
    Microsoft.Xrm.Sdk.Deployment.UpdateRequest

Seguridad de hilo

Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para el hilo. No se garantiza que los miembros de instancia sean seguros para el hilo.

Plataformas

Plataformas de desarrollo

Windows Vista, Windows Server 2003 y

Plataformas de destino

Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Teléfono inteligente,Windows Server 2003,Windows XP Professional,Windows Vista,Windows XP

Change History

Vea también

Referencia

Miembros de UpdateRequest
Espacio de nombres de Microsoft.Xrm.Sdk.Deployment
UpdateResponse

Otros recursos

Use Deployment Entities and Deployment Configuration Settings

Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.