DeleteRequest Class

 

Updated: November 29, 2016

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)


[DataContractAttribute(Name = "DeleteRequest", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
[KnownTypeAttribute(typeof(DeleteOrganizationRequest))]
public class DeleteRequest : DeploymentServiceRequest

NameDescription
System_CAPS_pubmethodDeleteRequest()

Initializes a new instance of the DeleteRequest class.

NameDescription
System_CAPS_pubpropertyEntityType

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

System_CAPS_pubpropertyExtensionData

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

System_CAPS_pubpropertyInstanceTag

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

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(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;
    client.Update(organization);


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

    client.Close();
}

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright

Community Additions

ADD
Show: