2

I use eclipse for deletions of layouts. Clicking through the UI it works just fine. But I have to do it over an over again on many orgs and now I want to automate that task with ant.

Maybe I'm wrong but I would assume, that eclipse might generate a temporary destructiveChanges.xml. If so, is there a way to find it in my filesystem? (Windows)

If not, is there any other way to use an UI to create an destructiveChanges.xml?

1

The destructiveChanges.xml file follows the exact same format as the package.xml file format. I'm mobile right now, but it looks like this:

<?xml version="1.0" encoding="UTF-8"?> 
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> 
  <types>
    <members>Account-Account Layout</members>
    <name>Layout</name> 
  </types>
  <version>41.0</version> 
</Package>

Simply list each layout, object name then layout name, separated by a hyphen.

Technically, in the Force.com IDE, if you select the layouts in the project, then select Save to server, your package.xml should already be in the correct format for you to copy-paste into a destructiveChanges.xml file for an Ant script directory or DX directory.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.