4

I want to delete a email folder (empty) with a destructive package but I can't make this work.

I made a .zip with my 2 files :

package.xml

    <?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>44.0</version>
</Package>

destructiveChangePost.xml

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

</Package>

When I try to deploy with Workbench, the folder isn't deleted :

enter image description here

enter image description here

Is it possible to do it in that way?

6
  • When you use workbench , have you made Check Only flag as true? Commented Jan 21, 2019 at 14:09
  • @PranayJaiswal No, I let all the boxes uncheck Commented Jan 21, 2019 at 14:19
  • are there any emails inside the folder? Commented Jan 21, 2019 at 14:35
  • @PranayJaiswal The folder is empty Commented Jan 21, 2019 at 14:44
  • You are trying to delete file-folder and not email template folder. Can you try this instead? <name>EmailTemplate</name> Commented Jan 21, 2019 at 14:45

1 Answer 1

2

Email Template folder is not Folder Object but just EmailTemplate

Changing destructive.xml file include email template folder makes it delete it.

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

</Package>

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.