I've created a custom object in a developer edition org with the sole intention of deleting it via the Metadata API as per Deleting Components from an Organization.
To do this I created the following files:
package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>33.0</version>
</Package>
destructiveChanges.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>DFB__ObjectToBeDeleted__c</members>
<name>CustomObject</name>
</types>
</Package>
Then zipped them both into destructiveChanges.zip.
I uploaded the resulting zip file to the Workbench Metadata Deploy page and deployed it.
The processing status came back as successful.
However, the custom object is still present and there is no indication that it has been deleted.
I've tried:
- both with and without the namespace prefix for the member name in the destructiveChanges.xml.
- change the package manifest version to be 32.0 to match the version that Workbench is using.
- checking Purge On Delete in the Workbench deploy options.
- both including and excluding the
version
element in the destructiveChanges.xml.
Why can't I delete this custom object using destructive changes?
Note that this will ultimately be part of a much larger set of deletions. I could potentially use deleteMetadata(), but I'd rather figure out what is wrong with my deploy() call.