5

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?

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

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.