Can any one tell me the steps to delete a class using destructiveChanges.xml
Answer
- Fulfill the PreRequisites for using the Force.com Migration tool
- Install the Java JRE/ JDK
- Install Apache Ant
- Copy the
ant-salesforce.jar
file from the unzipped file into the ant lib directory. - Follow the steps at Apex deploying using Ant to understand the basic setup
- Construct your
destructiveChanges.xml
file using Propagating Destructive Changes
Sample:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>codepkg</fullName>
<types>
<members>SampleDeployClass</members>
<members>SampleFailingTestClass</members>
<name>ApexClass</name>
</types>
<version>26.0</version>
</Package>
Run the Force Migration tool
C:\>ant undeployCode
Here’s a Video Tutorial
Attribution
Source : Link , Question Author : Priyanka , Answer Author : Paul T. Rawkeen