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.
- create a temporary global value set via the UI
- retrieve it using workbench
- set the values in the xml
- 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"?>
<members>INSERT THE API NAME OF YOUR VS HERE</members>
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: