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.
Assembly: Microsoft.Xrm.Sdk.Deployment (in Microsoft.Xrm.Sdk.Deployment.dll)
Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
Microsoft.Xrm.Sdk.Deployment.DeleteRequest
Microsoft.Xrm.Sdk.Deployment.DeleteOrganizationRequest
| Name | Description | |
|---|---|---|
![]() | DeleteRequest() | Initializes a new instance of the DeleteRequest class. |
| Name | Description | |
|---|---|---|
![]() | EntityType | Gets or sets the type of deployment entity to be deleted. |
![]() | ExtensionData | Gets or sets the structure that contains extra data.(Inherited from DeploymentServiceRequest.) |
![]() | InstanceTag | Gets or sets the ID or the instance tag for the deployment record to be deleted. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | 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;
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.
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright


