You need to sign in to do that
Don't have an account?
Karan Kehar
Retrieve and Deploy Lightning Email Templates Folder
Hi All,
I am facing challenge in retreieving lightning email templates folder in vscode. I am aware that in order to retrieve classic email templates folder package.xml is like this:
<types>
<members>foldername</members>
<members>foldername/templatename</members>
<name>EmailTemplate</name>
</types>
When I use this package.xml for lightning email templates folder, I am able to retrieve the templates but the folder throws error:
=== WARNING: The following metadata isn’t in your org. If it’s not new, someone deleted it from the org.
Entity of type 'EmailTemplate' named 'foldername' cannot be found
The difference b/w lightning email template folder and classic email template folder is type:
For classic folder it is Email but for lightning it is coming as EmailTemplate
I am facing challenge in retreieving lightning email templates folder in vscode. I am aware that in order to retrieve classic email templates folder package.xml is like this:
<types>
<members>foldername</members>
<members>foldername/templatename</members>
<name>EmailTemplate</name>
</types>
When I use this package.xml for lightning email templates folder, I am able to retrieve the templates but the folder throws error:
=== WARNING: The following metadata isn’t in your org. If it’s not new, someone deleted it from the org.
Entity of type 'EmailTemplate' named 'foldername' cannot be found
The difference b/w lightning email template folder and classic email template folder is type:
For classic folder it is Email but for lightning it is coming as EmailTemplate
Greetings!
Please refer the below thread for helpful information to fix the issue:
https://salesforce.stackexchange.com/questions/136758/entity-type-folder-is-unknown-when-deploying-with-the-force-com-migration-t
https://salesforce.stackexchange.com/questions/313458/error-when-trying-to-push-lightning-emailtemplates-sfdx
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
Let me know if this helps
Thanks,
Anudeep
Thanks for your reply.
I went through the links shared by you and tried the same but still no luck.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>unfiled$public/MarketingProductInquiryResponse</members>
<members>unfiled$public/SalesNewCustomerEmail</members>
<name>EmailTemplate</name>
</types>
<version>51.0</version>
</Package>
Hugs!
sfdx force:source:retrieve -m "EmailTemplate:{Folder Name}"
To retrieve folder template:
sfdx force:source:retrieve -m "EmailTemplate:{Folder Name}/{EmailTemplate.DeveloperName}"
To find EmailTemplate.DeveloperName you can use SOQL
[SELECT Id, Name, DeveloperName, FolderName FROM EmailTemplate]