Creating a Global Picklist with custom API values

Global picklists are great. As is the ability to customize the API names separately from the label. But while you can create picklist values via copy/paste, you have to update the API values individually.

For small picklists its not that hard to do manually, but for large ones, there is another, better, way.

  1. create a temporary global value set via the UI
  2. retrieve it using workbench
  3. set the values in the xml
  4. insert the picklist via workbench

alternatively you could create the entire xml file manually and skip step 1 and 2, but that part is so easy via the ui that you might as well do so.

step 1 is covered in help and training

for step 2, this doc, has the info for the package.xml file you need (also copied below) and this article has a step by step for the retrieve process - just note you would use the package.xml as specified below.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>INSERT THE API NAME OF YOUR VS HERE</members>
<name>GlobalValueSet</name>
</types>
<version>40.0</version>
</Package>

for step 3, unzip the zip file you retrieved and open up the single xml file in there besides your package.xml. and set the fullname parameter to your desired API name, and leave label alone.

save this file, create a zip file of the package.xml file, the folder, and your customized file, and deploy this back to workbench using basiclally the same steps as before, but with the ‘deploy’ option

with any luck, you will have something that looks like this:

api_names.png

 
2
Kudos
 
2
Kudos

Now read this

Including Case Comments in Case Assignment Email

Including case comments in the case assignment email allows the recipient to see exactly what is going on before even logging in to Salesforce. You need a visualforce email template for this. You can use an apex:repeat component in your... Continue →