DeleteRequest Class

Applies To: Microsoft Dynamics CRM 2013, Microsoft 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)


<GeneratedCodeAttribute("System.Runtime.Serialization", "")> _
<DataContractAttribute(Name:="DeleteRequest", Namespace:="")> _
<DebuggerStepThroughAttribute> _
Public Class DeleteRequest
    Inherits DeploymentServiceRequest
[GeneratedCodeAttribute("System.Runtime.Serialization", "")] 
[DataContractAttribute(Name="DeleteRequest", Namespace="")] 
public class DeleteRequest : DeploymentServiceRequest


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



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 CRM, use DeleteRequest.

Inheritance Hierarchy


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.


Development Platforms

Windows Server 2008, Windows Server 2012, Windows 7 (All Versions), Windows 8 (All Versions)

Target 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 Server 2012, ,Windows 7 (All Versions), ,Windows 8 (All Versions)

Change History

See Also


DeleteRequest Members
Microsoft.Xrm.Sdk.Deployment Namespace

Other Resources

Introduction to the Deployment Web Service

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