Open amtrack opened 4 weeks ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
@amtrack - As always, excellent issue report! 🏆 This is a known server side bug. If you're willing, you can contact support and have them add your case to the existing internal work item: W-15633963. That will help prioritize a fix.
If this helps, I think you can deploy using the full path of the email template. E.g.:
sf project deploy start --metadata EmailTemplate:level1/level2/level3/template_level3_1715081809012
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
@shetzel Thanks for your fast response! ✅ I've now contacted support about this.
Do you know who can create and link Known Issues to the Metadata Coverage Report?
It would be great if other people could see that there are some issues with EmailTemplate
and EmailTemplateFolder
:
@amtrack - a known issue is in the works. Typically, Customer Support handles this in tandem with the owning developer team.
Summary
There are multiple issues with retrieving and deploying Nested Email Templates and Folders using the
sf
CLI:retrieving metadata using source tracking (
sf project retrieve start
) does not retrieve nested EmailTemplateFolder components:sf project retrieve start
level1
is retrievedlevel2
andlevel3
is not retrieveddeploying a nested EmailTemplate by Metadata API name fails:
sf project retrieve start --metadata EmailTemplate:level3/template_level3_1715081809012
sf project deploy start --metadata EmailTemplate:level3/template_level3_1715081809012
Given the following directory structure with 3 nested folders (
level1/level2/level3
) and one template in each level.Apparently different names are being used in the Metadata API /
SourceMember
Tooling API /FileResponse
:[1]: listing folders using
sf org list metadata -m EmailTemplateFolder
and listing templates in a folder e.g.sf org list metadata -m EmailTemplate --folder level3
[2]: query SourceMember records usingsf data query --use-tooling-api --query "SELECT MemberType, MemberName FROM SourceMember"
[3]: retrieve metadata with --json flagsf project retrieve start --json --metadata xxx
# see.result.fileProperties
Steps To Reproduce
Email > Lightning Email Templates > Folders and Enhanced Sharing
sf project retrieve start
-> does not retrieve folders in level 2 and 3--metadata EmailTemplate:level3/template_level3_1715081809012
)Expected result
Actual result
System Information
Additional information
Repositories for reproduction: