I have a Salesforce Service enabled Sandbox and I have created some messaging templates in Service Setup/Home/Channels/Messaging/Messaging Templates. I need to retrieve metadata related to those Templates to vs code using sfdx. How can I modify my package.xml to achieve that?
2 Answers
Since it seems that it is not supported by Metadata API, I have found a workaround, with Workbench I queried object Messaging Template:
SELECT DeveloperName,MasterLabel,Message FROM MessagingTemplate
Then in VS Code, exported that result as a JSON file and imported on my other sandbox.
sfdx force:data:tree:export -q "<SOQL query>" -d "<exported file path>"
sfdx force:data:tree:import -f "<exported file path>"
Add the MessagingTemplate object to your package:
<types>
<members>*</members>
<name>MessagingTemplate</name>
</types>
-
Im getting this error: ERROR running force:source:retrieve: Element {soap.sforce.com/2006/04/metadata}type invalid at this location May 13, 2020 at 13:32
-
-
hahah, no problem. Still, now this: === WARNING: The following metadata isn’t in your org. If it’s not new, someone deleted it from the org. Entity type: 'MessagingTemplate' is unknown May 13, 2020 at 13:53
-
1@YanetP1988 Interesting. I need to some research on this. It doesn't appear in my dev org.– sfdcfoxMay 13, 2020 at 13:53
-
I've been doing some research and it seems that it is not supported by Metadata API May 15, 2020 at 15:49