How to print all EmailTemplate component names using SFDX CLI?Not able to just deploy classes folder using Force Migration ToolHow to specify what components to retrieve for the command “force:mdapi:retrieve”?“Cannot set property color of #<CLI> which has only a getter” when running sfdx commandsIs this possible to install SFDX CLI on Heroku instance?Error on running SFDX CLI commandHow do sfdx-cli version numbers and release notes work?How can I upsert & populate Lookups with external Id using sfdx?

Fair Use of Photos as a Derivative Work

How to explain that the sums of numerators over sums of denominators isn't the same as the mean of ratios?

Injection from two strings to one string

What is the next number in the sequence 21, 21, 23, 20, 5, 25, 31, 24, ...?

Why does the first method take more than twice as long to create an array?

Can 35 mm film which went through a washing machine still be developed?

What does the whole letter in Black Panther by Prince NJobu say?

Had there been instances of national states banning harmful imports before the Opium wars?

Go (to / in) your own way

If LPG gas burners can reach temperatures above 1700 °C, then how do HCA and PAH not develop in extreme amounts during cooking?

Is cloning illegal in the Star Trek: TNG continuity?

The work of mathematicians outside their professional environment

What is the difference between 山道【さんどう】 and 山道【やまみち】?

Is there any specific significance of inverse demand?

In 1700s, why was 'books that never read' grammatical?

Proof of bound on optimal TSP tour length in rectangular region

Is insurance company’s preferred auto shop biased?

difference between $HOME and ~

Would we have more than 8 minutes of light, if the sun "went out"?

Forcing all requests to HTTPS vs not forcing all requests

Indexing of the enviroment enumerate by **babyloniannum** gives an error

How can three vectors be orthogonal to each other?

Why do English transliterations of Arabic names have so many Qs in them?

Is there a difference between historical fiction and creative non-fiction?



How to print all EmailTemplate component names using SFDX CLI?


Not able to just deploy classes folder using Force Migration ToolHow to specify what components to retrieve for the command “force:mdapi:retrieve”?“Cannot set property color of #<CLI> which has only a getter” when running sfdx commandsIs this possible to install SFDX CLI on Heroku instance?Error on running SFDX CLI commandHow do sfdx-cli version numbers and release notes work?How can I upsert & populate Lookups with external Id using sfdx?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









1















I run the below command and it prints undefined.



~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public
undefined


When I run the above command with --metadatatype=CustomObject, it is working fine but not for EmailTemplate



What is wrong I am doing here?










share|improve this question
































    1















    I run the below command and it prints undefined.



    ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public
    undefined


    When I run the above command with --metadatatype=CustomObject, it is working fine but not for EmailTemplate



    What is wrong I am doing here?










    share|improve this question




























      1












      1








      1








      I run the below command and it prints undefined.



      ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public
      undefined


      When I run the above command with --metadatatype=CustomObject, it is working fine but not for EmailTemplate



      What is wrong I am doing here?










      share|improve this question
















      I run the below command and it prints undefined.



      ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public
      undefined


      When I run the above command with --metadatatype=CustomObject, it is working fine but not for EmailTemplate



      What is wrong I am doing here?







      metadata-api salesforcedx-cli






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 hours ago







      javanoob

















      asked 8 hours ago









      javanoobjavanoob

      4,2376 gold badges29 silver badges81 bronze badges




      4,2376 gold badges29 silver badges81 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          2
















          $ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled$public"



          Here is the complete command that is working:



          ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public


          NOTE: I ran into this issue on macOS.



          Here is the bash script I created to prepare pacakge.xml with all EmailTemplate component names from the org:



          #!/bin/bash
          sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devsandbox --json | jq '.result[].fullName' > temp.txt
          input="temp.txt"
          rm -f package_temp.xml
          echo "<?xml version="1.0" encoding="utf-8" standalone="yes"?>n" >> package_temp.xml
          echo "<Package xmlns="http://soap.sforce.com/2006/04/metadata">" >> package_temp.xml
          echo " <types>" >> package_temp.xml
          while IFS= read -r line
          do
          folderName="$line//"/"
          #folderName="'$id'"
          echo "$folderName"
          rm -f temp_1.txt
          sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --folder=$folderName --targetusername=devsandbox --json | jq '.result[].fullName' >> temp_1.txt
          while IFS= read -r line1
          do
          templateName="$line1//"/"
          echo " <members>$templateName</members>" >> package_temp.xml
          done < "temp_1.txt"
          done < "$input"
          echo " <name>EmailTemplate</name>" >> package_temp.xml
          echo " </types>" >> package_temp.xml
          echo " <version>46.0</version>" >> package_temp.xml
          echo "</Package>" >> package_temp.xml
          cat package_temp.xml





          share|improve this answer






















          • 1





            In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

            – sfdcfox
            7 hours ago












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f279803%2fhow-to-print-all-emailtemplate-component-names-using-sfdx-cli%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2
















          $ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled$public"



          Here is the complete command that is working:



          ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public


          NOTE: I ran into this issue on macOS.



          Here is the bash script I created to prepare pacakge.xml with all EmailTemplate component names from the org:



          #!/bin/bash
          sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devsandbox --json | jq '.result[].fullName' > temp.txt
          input="temp.txt"
          rm -f package_temp.xml
          echo "<?xml version="1.0" encoding="utf-8" standalone="yes"?>n" >> package_temp.xml
          echo "<Package xmlns="http://soap.sforce.com/2006/04/metadata">" >> package_temp.xml
          echo " <types>" >> package_temp.xml
          while IFS= read -r line
          do
          folderName="$line//"/"
          #folderName="'$id'"
          echo "$folderName"
          rm -f temp_1.txt
          sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --folder=$folderName --targetusername=devsandbox --json | jq '.result[].fullName' >> temp_1.txt
          while IFS= read -r line1
          do
          templateName="$line1//"/"
          echo " <members>$templateName</members>" >> package_temp.xml
          done < "temp_1.txt"
          done < "$input"
          echo " <name>EmailTemplate</name>" >> package_temp.xml
          echo " </types>" >> package_temp.xml
          echo " <version>46.0</version>" >> package_temp.xml
          echo "</Package>" >> package_temp.xml
          cat package_temp.xml





          share|improve this answer






















          • 1





            In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

            – sfdcfox
            7 hours ago















          2
















          $ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled$public"



          Here is the complete command that is working:



          ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public


          NOTE: I ran into this issue on macOS.



          Here is the bash script I created to prepare pacakge.xml with all EmailTemplate component names from the org:



          #!/bin/bash
          sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devsandbox --json | jq '.result[].fullName' > temp.txt
          input="temp.txt"
          rm -f package_temp.xml
          echo "<?xml version="1.0" encoding="utf-8" standalone="yes"?>n" >> package_temp.xml
          echo "<Package xmlns="http://soap.sforce.com/2006/04/metadata">" >> package_temp.xml
          echo " <types>" >> package_temp.xml
          while IFS= read -r line
          do
          folderName="$line//"/"
          #folderName="'$id'"
          echo "$folderName"
          rm -f temp_1.txt
          sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --folder=$folderName --targetusername=devsandbox --json | jq '.result[].fullName' >> temp_1.txt
          while IFS= read -r line1
          do
          templateName="$line1//"/"
          echo " <members>$templateName</members>" >> package_temp.xml
          done < "temp_1.txt"
          done < "$input"
          echo " <name>EmailTemplate</name>" >> package_temp.xml
          echo " </types>" >> package_temp.xml
          echo " <version>46.0</version>" >> package_temp.xml
          echo "</Package>" >> package_temp.xml
          cat package_temp.xml





          share|improve this answer






















          • 1





            In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

            – sfdcfox
            7 hours ago













          2














          2










          2









          $ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled$public"



          Here is the complete command that is working:



          ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public


          NOTE: I ran into this issue on macOS.



          Here is the bash script I created to prepare pacakge.xml with all EmailTemplate component names from the org:



          #!/bin/bash
          sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devsandbox --json | jq '.result[].fullName' > temp.txt
          input="temp.txt"
          rm -f package_temp.xml
          echo "<?xml version="1.0" encoding="utf-8" standalone="yes"?>n" >> package_temp.xml
          echo "<Package xmlns="http://soap.sforce.com/2006/04/metadata">" >> package_temp.xml
          echo " <types>" >> package_temp.xml
          while IFS= read -r line
          do
          folderName="$line//"/"
          #folderName="'$id'"
          echo "$folderName"
          rm -f temp_1.txt
          sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --folder=$folderName --targetusername=devsandbox --json | jq '.result[].fullName' >> temp_1.txt
          while IFS= read -r line1
          do
          templateName="$line1//"/"
          echo " <members>$templateName</members>" >> package_temp.xml
          done < "temp_1.txt"
          done < "$input"
          echo " <name>EmailTemplate</name>" >> package_temp.xml
          echo " </types>" >> package_temp.xml
          echo " <version>46.0</version>" >> package_temp.xml
          echo "</Package>" >> package_temp.xml
          cat package_temp.xml





          share|improve this answer















          $ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled$public"



          Here is the complete command that is working:



          ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public


          NOTE: I ran into this issue on macOS.



          Here is the bash script I created to prepare pacakge.xml with all EmailTemplate component names from the org:



          #!/bin/bash
          sfdx force:mdapi:listmetadata --metadatatype=EmailFolder --targetusername=devsandbox --json | jq '.result[].fullName' > temp.txt
          input="temp.txt"
          rm -f package_temp.xml
          echo "<?xml version="1.0" encoding="utf-8" standalone="yes"?>n" >> package_temp.xml
          echo "<Package xmlns="http://soap.sforce.com/2006/04/metadata">" >> package_temp.xml
          echo " <types>" >> package_temp.xml
          while IFS= read -r line
          do
          folderName="$line//"/"
          #folderName="'$id'"
          echo "$folderName"
          rm -f temp_1.txt
          sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --folder=$folderName --targetusername=devsandbox --json | jq '.result[].fullName' >> temp_1.txt
          while IFS= read -r line1
          do
          templateName="$line1//"/"
          echo " <members>$templateName</members>" >> package_temp.xml
          done < "temp_1.txt"
          done < "$input"
          echo " <name>EmailTemplate</name>" >> package_temp.xml
          echo " </types>" >> package_temp.xml
          echo " <version>46.0</version>" >> package_temp.xml
          echo "</Package>" >> package_temp.xml
          cat package_temp.xml






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 48 mins ago

























          answered 8 hours ago









          javanoobjavanoob

          4,2376 gold badges29 silver badges81 bronze badges




          4,2376 gold badges29 silver badges81 bronze badges










          • 1





            In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

            – sfdcfox
            7 hours ago












          • 1





            In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

            – sfdcfox
            7 hours ago







          1




          1





          In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

          – sfdcfox
          7 hours ago





          In some terminals. It's always worth the time to learn your OS's terminal, as you never know when you'll run in to some quirk of the OS.

          – sfdcfox
          7 hours ago


















          draft saved

          draft discarded















































          Thanks for contributing an answer to Salesforce Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f279803%2fhow-to-print-all-emailtemplate-component-names-using-sfdx-cli%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її