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

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>FieldBusinessStatus</members>
<name>StandardValueSet</name>
</types>
<version>54.0</version>
</Package>

this downloads the existing values for Field Usage picklist, in case someone has customized it before you!

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>

folderstructure.png

Screenshot from 2022-04-21 14-23-48.png

integrated.png

 
0
Kudos
 
0
Kudos

Now read this

Custom User Controller Extension - to allow users to edit fields on user record

[update : captains log june 18 2020. #summer20 release. its a lot easier to use a flow that runs in system mode to do most anything that requires a without-sharing apex controller] As custom controllers can run in system mode,... Continue →