DeleteRequest Class


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

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

Namespace:   Microsoft.Xrm.Sdk.Deployment
Assembly:  Microsoft.Xrm.Sdk.Deployment (in Microsoft.Xrm.Sdk.Deployment.dll)

Inheritance Hierarchy



[DataContractAttribute(Name = "DeleteRequest", Namespace = "")]
public class DeleteRequest : DeploymentServiceRequest
<DataContractAttribute(Name := "DeleteRequest", Namespace := "")>
Public Class DeleteRequest
    Inherits DeploymentServiceRequest


Name Description
System_CAPS_pubmethod DeleteRequest()

Initializes a new instance of the DeleteRequest class.


Name Description
System_CAPS_pubproperty EntityType

Gets or sets the type of deployment entity to be deleted.

System_CAPS_pubproperty ExtensionData

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

System_CAPS_pubproperty InstanceTag

Gets or sets the ID or the instance tag for the deployment record to be deleted.


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


Pass an instance of this class to the Execute method, which returns an instance of DeleteResponse.

Note that this is the Deployment Web Service. To delete organization data records in Microsoft Dynamics 365, use DeleteRequest.


The following code shows how to delete an organization.

using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
    EntityInstanceId id = new EntityInstanceId
        Name = "AlpineSkiHouse2"

    // disable the organization
    Organization organization = (Organization)client.Retrieve(DeploymentEntityType.Organization, id);
    organization.State = OrganizationState.Disabled;

    // delete the organization
    DeleteRequest request = new DeleteRequest
        EntityType = DeploymentEntityType.Organization,
        InstanceTag = id
    DeleteResponse response = (DeleteResponse)client.Execute(request);


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

Microsoft.Xrm.Sdk.Deployment Namespace
Introduction to the deployment web service

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright