DeleteRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the data that is needed to delete a deployment record.
public ref class DeleteRequest : Microsoft::Xrm::Sdk::Deployment::DeploymentServiceRequest
[System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")]
[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.Serialization.DataContract(Name="DeleteRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")]
[System.Runtime.Serialization.KnownType(typeof(Microsoft.Xrm.Sdk.Deployment.DeleteOrganizationRequest))]
public class DeleteRequest : Microsoft.Xrm.Sdk.Deployment.DeploymentServiceRequest
[<System.CodeDom.Compiler.GeneratedCode("System.Runtime.Serialization", "4.0.0.0")>]
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Runtime.Serialization.DataContract(Name="DeleteRequest", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts/Deployment")>]
[<System.Runtime.Serialization.KnownType(typeof(Microsoft.Xrm.Sdk.Deployment.DeleteOrganizationRequest))>]
type DeleteRequest = class
inherit DeploymentServiceRequest
Public Class DeleteRequest
Inherits DeploymentServiceRequest
- Inheritance
- Derived
- Attributes
Examples
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();
}
Remarks
Pass an instance of this class to the Execute(DeploymentServiceRequest) 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.
Constructors
DeleteRequest() |
Initializes a new instance of the DeleteRequest class. |
Properties
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. |