Marking fields used in Integrations
Another way to mark fields used in Integrations.
2 years back I conjured up this approach to prevent deletion of fields used in integrations.
I still needed a better way to flag these fields. Description field is pretty good, but wanted to add the picklist value “Integrated” to the field usage
picklist.
Turns out that you can only do this via the metadata api, so this is how to do it
- create a file named package.xml with the following content
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>FieldBusinessStatus</members>
<name>StandardValueSet</name>
</types>
<version>54.0</version>
</Package>
- login to workbench.developerforce.com and go to migration - retrieve
- upload that package.xml file
- click ‘download zip file’
this downloads the existing values for Field Usage picklist, in case someone has customized it before you!
- Unzip the file
- Edit the file named “FieldBusinessStatus.standardValueSet”
add the following lines to wherever you want the picklist to appear
</standardValue>
<standardValue>
<fullName>Integrated</fullName>
<default>false</default>
<label>Integrated</label>
<groupingString>Active</groupingString>
</standardValue>
if you have not customized the values before, your file should look something like this
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<groupingStringEnum>FieldBusinessStatusCode</groupingStringEnum>
<sorted>false</sorted>
<standardValue>
<fullName>Active</fullName>
<default>false</default>
<label>Active</label>
<groupingString>Active</groupingString>
</standardValue>
<standardValue>
<fullName>Integrated</fullName>
<default>false</default>
<label>Integrated</label>
<groupingString>Active</groupingString>
</standardValue>
<standardValue>
<fullName>DeprecateCandidate</fullName>
<default>false</default>
<label>DeprecateCandidate</label>
<groupingString>DeprecateCandidate</groupingString>
</standardValue>
<standardValue>
<fullName>Hidden</fullName>
<default>false</default>
<label>Hidden</label>
<groupingString>Hidden</groupingString>
</standardValue>
</StandardValueSet>
- go up one folder, and select the package.xml file and the folder named “standardValueSets” and compress them into a single zip file
login to workbench.developerforce.com and go to migration - deploy
select the zip file, and check allow missing files, ignore warnings, rollback on error, single package, and for test level select run local tests.
- click next, and if it deploys successfully, you will now have the ‘integrated’ value available to select in the Field Usage picklist!