<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Translation on Uwe Braig</title><link>https://blog.uwe-braig.de/tags/translation/</link><description>Recent content in Translation on Uwe Braig</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 17 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.uwe-braig.de/tags/translation/index.xml" rel="self" type="application/rss+xml"/><item><title>SfMetadataToolkit: Bulk manage Picklist Values, Labels and Translations in Salesforce with Excel</title><link>https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/</link><pubDate>Fri, 17 Jul 2026 00:00:00 +0000</pubDate><guid>https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/</guid><description>&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-setup-picklist-value-sets.png" alt="" width="1504" height="407" loading="lazy"&gt;
 &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;&lt;h2 id="the-configuration-challenge"&gt;The Configuration Challenge
&lt;/h2&gt;&lt;p&gt;Creating, updating and translating picklist values in Salesforce can be a time-consuming exercise. In this article, I will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Review how this is done manually via the Salesforce Setup UI.&lt;/li&gt;
&lt;li&gt;Briefly examine the metadata XML file that can be extracted and deployed via the Salesforce Command Line Interface (CLI).&lt;/li&gt;
&lt;li&gt;Demonstrate how an Excel-based data dictionary can be used as input for the SfMetadataToolkit to generate deployment-ready metadata.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="via-the-salesforce-setup-ui"&gt;Via The Salesforce Setup UI
&lt;/h3&gt;&lt;p&gt;This requires multiple steps in the Setup UI. A typical sequence to add and translate values looks like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to the Global Value Set / Picklist Value Set:
&lt;ul&gt;
&lt;li&gt;Click &lt;code&gt;New&lt;/code&gt; to add new picklist values. This is the only step in the sequence where a bulk-operation is possible by copying and pasting multiple values in one go.&lt;/li&gt;
&lt;li&gt;If you want the Master Label to differ from the API value, then go through all values one by one and click &lt;code&gt;Edit&lt;/code&gt; to update Label and/or API Name.&lt;/li&gt;
&lt;li&gt;If you want to reorder the values to a specific sequence, click &lt;code&gt;Reorder&lt;/code&gt; to move individual values up and down, one click at a time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If you then want to translate the labels, you have to go to a different setup screen: Navigate to the Translation Workbench:
&lt;ul&gt;
&lt;li&gt;Select the first language.&lt;/li&gt;
&lt;li&gt;Navigate to Setup Component &amp;lsquo;Global Value Set&amp;rsquo;.&lt;/li&gt;
&lt;li&gt;Select the value set and wait to see the current translations.&lt;/li&gt;
&lt;li&gt;Click through all translations to add/update.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Save&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If you need this for another language, repeat the Translation Workbench process.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Obviously, this is not an efficient approach for more than some one-off changes.&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-manual-setup-global-value-set.png" alt="" width="625" height="535" loading="lazy"&gt;
 &lt;figcaption&gt;An example for a picklist value set as shown in the Salesforce Setup UI&lt;/figcaption&gt;
&lt;/figure&gt;&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-manual-setup-picklist-edit.png" alt="" width="564" height="287" loading="lazy"&gt;
 &lt;figcaption&gt;An example for a picklist edit operation in the Salesforce Setup UI&lt;/figcaption&gt;
&lt;/figure&gt;&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-manual-setup-translate.png" alt="" width="799" height="277" loading="lazy"&gt;
 &lt;figcaption&gt;An example for a picklist translation in the translation workbench&lt;/figcaption&gt;
&lt;/figure&gt;&lt;h3 id="via-the-salesforce-command-line-interface-cli"&gt;Via the Salesforce Command Line Interface (CLI)
&lt;/h3&gt;&lt;p&gt;With the Salesforce Command Line Interface (CLI, also known as SFDX), you get direct access to the raw XML version of the metadata, in this case a Picklist Value Set, in your local file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retrieve the files via &lt;code&gt;sf project retrieve&lt;/code&gt; command(s), e.g. as given below.&lt;/li&gt;
&lt;li&gt;Edit the XML file(s) as needed.&lt;/li&gt;
&lt;li&gt;(Re-)Deploy with the corresponding counterpart &lt;code&gt;sf project deploy start ...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sf project retrieve start -m GlobalValueSet:MyPicklistValueSet
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sf project retrieve start -m GlobalValueSetTranslation:MyPicklistValueSet-en
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sf project retrieve start -m GlobalValueSetTranslation:MyPicklistValueSet-de
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-cli-retrieved-source.png" alt="" width="1217" height="135" loading="lazy"&gt;
 &lt;figcaption&gt;Example output for the preceding retrieve command&lt;/figcaption&gt;
&lt;/figure&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;GlobalValueSet&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;http://soap.sforce.com/2006/04/metadata&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;fullName&amp;gt;&lt;/span&gt;A&lt;span class="nt"&gt;&amp;lt;/fullName&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;default&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/default&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;A - Master Label&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;/customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;fullName&amp;gt;&lt;/span&gt;B&lt;span class="nt"&gt;&amp;lt;/fullName&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;default&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/default&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;B - Master Label&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;/customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;fullName&amp;gt;&lt;/span&gt;C&lt;span class="nt"&gt;&amp;lt;/fullName&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;default&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/default&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;C - Master Label&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;/customValue&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;masterLabel&amp;gt;&lt;/span&gt;My Picklist Value Set&lt;span class="nt"&gt;&amp;lt;/masterLabel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="nt"&gt;&amp;lt;sorted&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/sorted&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/GlobalValueSet&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;GlobalValueSetTranslation&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;http://soap.sforce.com/2006/04/metadata&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;masterLabel&amp;gt;&lt;/span&gt;A - Master Label&lt;span class="nt"&gt;&amp;lt;/masterLabel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;translation&amp;gt;&lt;/span&gt;A - German Translation&lt;span class="nt"&gt;&amp;lt;/translation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;masterLabel&amp;gt;&lt;/span&gt;B - Master Label&lt;span class="nt"&gt;&amp;lt;/masterLabel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;translation&amp;gt;&lt;/span&gt;B - German Translation&lt;span class="nt"&gt;&amp;lt;/translation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;masterLabel&amp;gt;&lt;/span&gt;C - Master Label&lt;span class="nt"&gt;&amp;lt;/masterLabel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;translation&amp;gt;&lt;/span&gt;C - German Translation&lt;span class="nt"&gt;&amp;lt;/translation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/valueTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/GlobalValueSetTranslation&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Obviously, this isn&amp;rsquo;t an efficient approach either because you now have to deal with XML syntax and its associated pitfalls.&lt;/p&gt;
&lt;h2 id="introducing-sfmetadatatoolkit"&gt;Introducing SfMetadataToolkit
&lt;/h2&gt;&lt;p&gt;This approach at a glance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fill your picklist values, labels and translations into an Excel (or a corresponding .csv) template.&lt;/li&gt;
&lt;li&gt;Run the toolkit&amp;rsquo;s importer and builder commands to create the corresponding metadata XML files&lt;/li&gt;
&lt;li&gt;Optionally, run the diff tool of your choice (e.g. git diff) to see changes.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;Salesforce CLI&lt;/code&gt; to deploy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The full benefit is realized if you use the spreadsheet as a Data Dictionary holding the source of truth: The Data Dictionary is the documentation that is always up to date because the metadata is automatically derived from it.&lt;/p&gt;
&lt;h3 id="build-metadata-from-the-excel-based-template"&gt;Build Metadata From The Excel-based Template
&lt;/h3&gt;&lt;p&gt;Fill in the worksheet &lt;code&gt;_GlobalValueSets&lt;/code&gt; to declare the Global Picklist Value Sets to be created:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-xls-template-global-value-sets.png" alt="" width="864" height="151" loading="lazy"&gt;
 &lt;figcaption&gt;Worksheet ‘_GlobalValueSets’ of the Excel template&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;Fill in the worksheet &lt;code&gt;_PicklistValues&lt;/code&gt; and for each Picklist Value Set, define the order, values, labels and translations as needed:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-xls-template-picklist-values.png" alt="" width="1135" height="215" loading="lazy"&gt;
 &lt;figcaption&gt;Worksheet ‘_PicklistValues’ of the Excel template&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;Run the following toolkit commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-PowerShell" data-lang="PowerShell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$Metadata&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Import-SfMetadataModel&lt;/span&gt; &lt;span class="n"&gt;-Path&lt;/span&gt; &lt;span class="p"&gt;.\&lt;/span&gt;&lt;span class="nb"&gt;EXAMPLE-DataDictionary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;xlsx&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Build-SfGlobalValueSetMetadata&lt;/span&gt; &lt;span class="nv"&gt;$Metadata&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Build-SfGlobalValueSetTranslationMetadata&lt;/span&gt; &lt;span class="nv"&gt;$Metadata&lt;/span&gt; &lt;span class="n"&gt;-LanguageCodes&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;de&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="build-metadata-from-the-csv-template"&gt;Build Metadata From The CSV Template
&lt;/h3&gt;&lt;p&gt;The toolkit also accepts CSV files as long as those are structured the same way. So, if you prefer sources other than Excel, here is the way to go.&lt;/p&gt;
&lt;p&gt;Prepare the file &lt;code&gt;_GlobalValueSets.csv&lt;/code&gt;:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-csv-template-global-value-sets.png" alt="" width="1360" height="98" loading="lazy"&gt;
 &lt;figcaption&gt;Example file _GlobalValueSets.csv&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;Prepare the file &lt;code&gt;_PicklistValues.csv&lt;/code&gt;:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-csv-template-picklist-values.png" alt="" width="1502" height="149" loading="lazy"&gt;
 &lt;figcaption&gt;Example file _PicklistValues.csv&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;Put all relevant CSV files together into one directory and run the following toolkit commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-PowerShell" data-lang="PowerShell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$Metadata&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Import-SfMetadataModel&lt;/span&gt; &lt;span class="n"&gt;-Path&lt;/span&gt; &lt;span class="p"&gt;.\&lt;/span&gt;&lt;span class="nb"&gt;csv-example&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Build-SfGlobalValueSetMetadata&lt;/span&gt; &lt;span class="nv"&gt;$Metadata&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Build-SfGlobalValueSetTranslationMetadata&lt;/span&gt; &lt;span class="nv"&gt;$Metadata&lt;/span&gt; &lt;span class="n"&gt;-LanguageCodes&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;de&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="examine-and-diff-the-result-files-as-needed"&gt;Examine and Diff the Result Files as Needed
&lt;/h3&gt;&lt;p&gt;The resulting files in the force-app folder look like this:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-force-app-folder.png" alt="" width="398" height="265" loading="lazy"&gt;
 &lt;figcaption&gt;Resulting force-app folder as shown in Visual Studio Code&lt;/figcaption&gt;
&lt;/figure&gt;&lt;p&gt;Deploy&amp;hellip;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sf project deploy start -m GlobalValueSet GlobalValueSetTranslation
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&amp;hellip;and enjoy:&lt;/p&gt;
&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-deployed-value-sets.png" alt="" width="637" height="261" loading="lazy"&gt;
 &lt;figcaption&gt;The deployed picklist value sets as per Salesforce Setup UI&lt;/figcaption&gt;
&lt;/figure&gt;&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-deployed-value-set.png" alt="" width="493" height="474" loading="lazy"&gt;
 &lt;figcaption&gt;A single example deployed picklist value set as per Salesforce Setup UI&lt;/figcaption&gt;
&lt;/figure&gt;&lt;figure&gt;
 &lt;img src="https://blog.uwe-braig.de/sf-metadata-toolkit-bulk-manage-global-value-sets/screenshot-deployed-translations.png" alt="" width="599" height="686" loading="lazy"&gt;
 &lt;figcaption&gt;Deployed picklist label translations as per Translation Workbench in Salesforce Setup UI&lt;/figcaption&gt;
&lt;/figure&gt;&lt;h2 id="how-it-works"&gt;How It Works
&lt;/h2&gt;&lt;p&gt;The SfMetadataToolkit operates on top of the Salesforce project structure managed by &lt;a class="link" href="https://developer.salesforce.com/tools/salesforcecli" target="_blank" rel="noopener"
 &gt;Salesforce CLI&lt;/a&gt;. It does not communicate directly with your Salesforce org nor does it issue any sf cli commands on its own. Instead, it only reads from and writes to the &lt;code&gt;*.*-meta.xml&lt;/code&gt; files in the &lt;code&gt;force-app&lt;/code&gt; folder. So it can be combined with any DevOps/deployment workflow, IDE and diff tool (git or non-git-based) of your choice.&lt;/p&gt;
&lt;blockquote class="alert alert-note"&gt;
 &lt;div class="alert-header"&gt;
 &lt;span class="alert-icon"&gt;📝&lt;/span&gt;
 &lt;span class="alert-title"&gt;Note&lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="alert-body"&gt;
 &lt;p&gt;If you don&amp;rsquo;t yet have a full developer setup: The minimum requirement is the CLI itself. You don&amp;rsquo;t have to set up VS Code (Notepad++ with XML plugin will do), you don&amp;rsquo;t need git (any file diff tool of your choice will do, e.g. Notepad++) and you don&amp;rsquo;t need to configure a Dev Hub.&lt;/p&gt;
 &lt;/div&gt;
 &lt;/blockquote&gt;
&lt;p&gt;You can use it for any one-off mass-creation of picklist values. The full strength of this approach, however, becomes apparent when you let the data dictionary be the source of truth for your implementation. With the metadata created from the documentation, the documentation and the implementation will always be in sync.&lt;/p&gt;
&lt;p&gt;With certain limitations, it will also support a round-trip approach where the data dictionary Excel can be reverse-engineered from the org&amp;rsquo;s metadata.&lt;/p&gt;
&lt;h2 id="how-to-get-it"&gt;How To Get It
&lt;/h2&gt;&lt;p&gt;The module is based on PowerShell 7.x, which is open source and available on Windows, macOS, and Linux:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/powershell/scripting/install/install-powershell" target="_blank" rel="noopener"
 &gt;Install PowerShell on Windows, Linux, and macOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/PowerShell/PowerShell" target="_blank" rel="noopener"
 &gt;PowerShell&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://learn.microsoft.com/en-us/powershell/scripting/overview" target="_blank" rel="noopener"
 &gt;What is PowerShell?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The SfMetadataToolkit is published on &lt;a class="link" href="https://codeberg.org/" target="_blank" rel="noopener"
 &gt;Codeberg&lt;/a&gt; and on the &lt;a class="link" href="https://www.powershellgallery.com/" target="_blank" rel="noopener"
 &gt;PowerShell Gallery&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://www.powershellgallery.com/packages/SfMetadataToolkit" target="_blank" rel="noopener"
 &gt;SfMetadataToolkit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;To install: &lt;code&gt;Install-Module -Name SfMetadataToolkit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://codeberg.org/uwe-braig/sf-metadata-toolkit" target="_blank" rel="noopener"
 &gt;Codeberg Repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PowerShell directly supports importing from and exporting to CSV files. To work with .xlsx files, the ImportExcel module needs to be installed from the PowerShell Gallery:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://www.powershellgallery.com/packages/ImportExcel/7.8.4" target="_blank" rel="noopener"
 &gt;ImportExcel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;To install: &lt;code&gt;Install-Module -Name ImportExcel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/dfinke/ImportExcel" target="_blank" rel="noopener"
 &gt;GitHub Repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="whats-next"&gt;What&amp;rsquo;s Next
&lt;/h2&gt;&lt;p&gt;This Data-Dictionary-driven approach has been battle-tested in various projects over the past years. The PowerShell code is currently being refactored and cleaned from some technical debt in order to be published as open source gradually. So stay tuned to see more functionality to come.&lt;/p&gt;</description></item><item><title>How to get Picklist Labels in Salesforce Flow</title><link>https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/</link><pubDate>Fri, 16 Aug 2024 00:00:00 +0000</pubDate><guid>https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/</guid><description>&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/01-article-header.png"
			alt="How to get Picklist Labels in Salesforce Flow"&gt;
&lt;/figure&gt;

&lt;p&gt;When working with picklist fields in Salesforce Flows, e.g. in a formula or a text template, the flow can only &amp;ldquo;see&amp;rdquo; the picklist API value and not the picklist label as shown in the GUI. This might not be an issue in your org if API value and label are configured to be always same and translation workbench is not in use. In all other cases, this can create usability constraints, e.g. when it comes to showing picklist values in Screen Flows or sending e-mails from within the Flow.&lt;/p&gt;
&lt;p&gt;I will discuss the following solutions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the Picklist screen component to extract the label.&lt;/li&gt;
&lt;li&gt;Use a set of Get Record elements to query the PicklistValueInfo standard object in order to find the label for a given picklist value.&lt;/li&gt;
&lt;li&gt;Use an invocable action in Flow to have an APEX class return the information from metadata.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All options in this article focus on handling single records and getting labels to display information on the screen or use text templates, for example to put together e-mails to be sent by the flow.&lt;/p&gt;
&lt;p&gt;There are additional challenges when it comes to working with record collections, for example, to be used in the Data Table screen component. There might be a future article about this.&lt;/p&gt;
&lt;h2 id="the-basic-scenario"&gt;The Basic Scenario
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;A Salesforce org with the translation workbench enabled.&lt;/li&gt;
&lt;li&gt;Active languages are English, German and Spanish.&lt;/li&gt;
&lt;li&gt;Translations are in place for English and German only.&lt;/li&gt;
&lt;li&gt;A custom object &lt;code&gt;MyCustomObject__c&lt;/code&gt; and its corresponding custom tab.&lt;/li&gt;
&lt;li&gt;A custom picklist field &lt;code&gt;MyPicklist__c&lt;/code&gt; using the global value set &lt;code&gt;MyPicklistValueSet&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;This global value set and its translations are shown in the table below.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/02-mypicklistvalueset.png"
			alt="MyPicklistValueSet"&gt;&lt;figcaption&gt;
			&lt;p&gt;MyPicklistValueSet&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Our example record looks like this:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/03-example-record.png"
			alt="Example Record"&gt;&lt;figcaption&gt;
			&lt;p&gt;Example Record&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We do a simple flow that gets the example record by its record ID and puts its fields on a screen component:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/04-basic-scenario-flow.png"
			alt="Basic Scenario Flow"&gt;&lt;figcaption&gt;
			&lt;p&gt;Basic Scenario Flow&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The screen component will show:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The Field component for the custom field &lt;code&gt;MyPicklist__c&lt;/code&gt; of our example record.&lt;/li&gt;
&lt;li&gt;A Display Text component that outputs the content of&lt;br&gt;
a) the picklist field directly,&lt;br&gt;
b) a text formula field referencing the picklist field,&lt;br&gt;
c) a text template referencing the picklist field.&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/05-field-component.png"
			alt="Field Component"&gt;&lt;figcaption&gt;
			&lt;p&gt;Field Component&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/06-display-text-component.png"
			alt="Display Text Component"&gt;&lt;figcaption&gt;
			&lt;p&gt;Display Text Component&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/07-text-formula.png"
			alt="Text Formula"&gt;&lt;figcaption&gt;
			&lt;p&gt;Text Formula&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/08-text-template.png"
			alt="Text Template"&gt;&lt;figcaption&gt;
			&lt;p&gt;Text Template&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;And here comes what is wrong with it when we run this flow: Although the field component properly renders the picklist field with its (translated) label as we would expect it, all further references to the picklist only show the API value.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/09-flow-output-basic.png"
			alt="Flow Output"&gt;&lt;figcaption&gt;
			&lt;p&gt;Flow Output&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="solution-1-picklist-choice-set"&gt;Solution #1: Picklist Choice Set
&lt;/h2&gt;&lt;p&gt;There is a difference between putting the &lt;em&gt;Field Component&lt;/em&gt; of the picklist custom field on a screen and putting a &lt;em&gt;Picklist Choice Set&lt;/em&gt; on a screen. As opposed to the basic scenario, here we use the Picklist Choice Set:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a new ressource of type Picklist Choice Set.&lt;/li&gt;
&lt;li&gt;Set Object to the custom object where our picklist field is located.&lt;/li&gt;
&lt;li&gt;Set the picklist field.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/10-mypicklistchoiceset.png"
			alt="MyPicklistChoiceSet"&gt;&lt;figcaption&gt;
			&lt;p&gt;MyPicklistChoiceSet&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Now the first component in our screen will be a picklist component that will refer to above Picklist Choice Set:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple Options = No&lt;/li&gt;
&lt;li&gt;Component Type = Picklist&lt;/li&gt;
&lt;li&gt;Choice = link to Picklist Choice Set as created above&lt;/li&gt;
&lt;li&gt;Default Value = The picklist field value from our example record.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Plus: Add the Picklist Component in the Display Text section.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/11-picklist-component.png"
			alt="Picklist Component"&gt;&lt;figcaption&gt;
			&lt;p&gt;Picklist Component&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Our debug run will now look like this:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/12-flow-output-solution1.png"
			alt="Flow Output"&gt;&lt;figcaption&gt;
			&lt;p&gt;Flow Output&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The text output of the Picklist Component will also work in formulas and text templates.&lt;/p&gt;
&lt;p&gt;Considerations for this approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Obviously it will only work in screen flows, i.e. not suitable for record-triggered flows nor scheduled flows.&lt;/li&gt;
&lt;li&gt;The Picklist Component must be rendered and visited during the screen flow, i.e. it MUST be shown to the user. It could be set to read-only (Disabled = &lt;code&gt;{!$GlobalConstant.True}&lt;/code&gt;), but not to hidden. Otherwise it won&amp;rsquo;t be initialized with its default value and will be empty on accessing it. This might or might not be compatible with your specific use case.&lt;/li&gt;
&lt;li&gt;Not suitable for record collections, especially for showing picklist labels in the Data Table component.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://help.salesforce.com/s/articleView?id=sf.flow_considerations_limit_transaction.htm&amp;amp;type=5" target="_blank" rel="noopener"
 &gt;Per-Transaction Flow Limits&lt;/a&gt;: Does not count towards &amp;ldquo;Total number of SOQL queries issued&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;It will always deliver the label for the language of the running user, i.e. either the Master Label or the label as per translation workbench.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="solution-2-get-record-to-query-picklistvalueinfo"&gt;Solution #2: „Get Record&amp;quot; to Query PicklistValueInfo
&lt;/h2&gt;&lt;p&gt;In this approach, we will query the standard objects EntityDefinition, FieldDefinition and PicklistValueInfo with the &amp;ldquo;Get Record&amp;rdquo; element in order to get the picklist label:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Query for the object definition of our object &lt;code&gt;MyCustomObject__c&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Query for the field definition of our custom field &lt;code&gt;MyPicklist__c&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Query for the picklist value info (including the label) for the value in our example record.&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/13-flow-with-picklistvalueinfo.png"
			alt="Flow with PicklistValueInfo"&gt;&lt;figcaption&gt;
			&lt;p&gt;Flow with PicklistValueInfo&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Here the details for getObjectDefinition:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/14-getobjectdefinition.png"
			alt="getObjectDefinition"&gt;&lt;figcaption&gt;
			&lt;p&gt;getObjectDefinition&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;With the DurableId from there, we can query the field definition:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/15-getfielddefinition.png"
			alt="getFieldDefinition"&gt;&lt;figcaption&gt;
			&lt;p&gt;getFieldDefinition&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;And with the DurableId of the field definition we can finally query for the Picklist Value Info:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/16-getpicklistvalueinfo.png"
			alt="getPicklistValueInfo"&gt;&lt;figcaption&gt;
			&lt;p&gt;getPicklistValueInfo&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Now we are able to reference the picklist label from the result of getPicklistValueInfo and use it in the screen display text or formula fields or text templates:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/17-display-text-screen-component.png"
			alt="Display Text Screen Component"&gt;&lt;figcaption&gt;
			&lt;p&gt;Display Text Screen Component&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Our debug run will now look like this:&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/18-flow-output-solution2.png"
			alt="Flow Output"&gt;&lt;figcaption&gt;
			&lt;p&gt;Flow Output&lt;/p&gt;
		&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Considerations for this approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Independent of any screen components, i.e. suitable for screen flows, record-triggered flows and scheduled flows.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://help.salesforce.com/s/articleView?id=sf.flow_considerations_limit_transaction.htm&amp;amp;type=5" target="_blank" rel="noopener"
 &gt;Per-Transaction Flow Limits&lt;/a&gt;: Each Get Record element counts as a SOQL query towards the &amp;ldquo;Total number of SOQL queries issued&amp;rdquo; limit. So be aware when it comes to getting labels for multiple picklist fields and/or with looping, for example, when working for record collections and the Data Table screen component.&lt;/li&gt;
&lt;li&gt;It will always deliver the label for the language of the running user, i.e. either the Master Label or the label as per translation workbench.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="solution-3-invocable-apex-methods"&gt;Solution #3: Invocable Apex Methods
&lt;/h2&gt;&lt;figure&gt;&lt;img src="https://blog.uwe-braig.de/how-to-get-picklist-labels-in-salesforce-flow/19-invocable-apex.png"
			alt="Invocable Apex Methods"&gt;
&lt;/figure&gt;

&lt;p&gt;For this approach, we need APEX code that can access the Schema objects and return labels for API values. Such APEX class can provide its methods as an &amp;ldquo;Invocable Method&amp;rdquo; which in turn can be accessed in a flow action.&lt;/p&gt;
&lt;p&gt;A good summary explanation for invocable actions can be found under &lt;a class="link" href="https://www.salesforceben.com/salesforce-invocable-apex-methods-a-complete-breakdown/" target="_blank" rel="noopener"
 &gt;https://www.salesforceben.com/salesforce-invocable-apex-methods-a-complete-breakdown/&lt;/a&gt; and an example implementation for such approach can be found under &lt;a class="link" href="https://unofficialsf.com/flow-action-get-picklist-values/" target="_blank" rel="noopener"
 &gt;https://unofficialsf.com/flow-action-get-picklist-values/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Considerations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All pros and cons of APEX coding, e.g. the need for developer capability and capacity and having proper test classes and code coverage in place.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://help.salesforce.com/s/articleView?id=sf.flow_considerations_limit_transaction.htm&amp;amp;type=5" target="_blank" rel="noopener"
 &gt;Per-Transaction Flow Limits&lt;/a&gt;: Does not consume SOQL queries within the &amp;ldquo;Total number of SOQL queries issued&amp;rdquo; limit.&lt;/li&gt;
&lt;li&gt;Suitable for screen flows, scheduled flows and record-triggered after-save flows.&lt;/li&gt;
&lt;li&gt;Not suitable for record-triggered before-save flows as those do not allow sub flows and actions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;These approaches are basically just workarounds for a, from my view, major lack of feature in Salesforce flow. It definitely should be a standard feature to be able to chose whether we want to see the API value or the label in the flow. I suggest to vote the following ideas on the &lt;a class="link" href="https://ideas.salesforce.com/" target="_blank" rel="noopener"
 &gt;IdeaExchange&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://ideas.salesforce.com/s/idea/a0B8W00000PJ4sTUAT/show-picklist-label-instead-of-api-value-in-flow-datatable" target="_blank" rel="noopener"
 &gt;https://ideas.salesforce.com/s/idea/a0B8W00000PJ4sTUAT/show-picklist-label-instead-of-api-value-in-flow-datatable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://ideas.salesforce.com/s/idea/a0B8W00000QN6h3UAD/show-value-or-trans-of-picklist-field-picked-for-data-table-column-screen-flow" target="_blank" rel="noopener"
 &gt;https://ideas.salesforce.com/s/idea/a0B8W00000QN6h3UAD/show-value-or-trans-of-picklist-field-picked-for-data-table-column-screen-flow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>