Table of Contents
Picklist Metadata by RecordType (from the Metadata API) #
Pull Picklist values by Record Type, including dependency hierarchy, controlling field relationships, and index mappings, per Object or for a specified Object.
Results are loaded to table ss_SysPicklistRT
Parameters #
| Parameter | Purpose |
| @ObjectName | Salesforce Object Name (for example Account).alternatively pass “All” to retrieve all Objects. |
| @Env | SQL Sales Environment Name, see Setup |
| @Special1 | Future use, not currently used |
| @Special2 | Future use, not currently used |
Example of Use – All #
exec ss_MetaPickRT 'DEMO', 'All'
Example of Use – Single #
exec ss_MetaPickRT 'DEMO', 'Account'
ss_SysPicklistRT table #
| Column Name | Purpose |
| ObjectName | The Salesforce object the picklist field belongs to (e.g. Account, Opportunity). |
| RecordTypeId | Unique Salesforce ID of the Record Type the picklist values apply to. |
| RecordTypeName | Name of the Record Type (e.g. Master, Customer, Partner). |
| FieldName | API name of the picklist field |
| ControllingField | Immediate controlling field (parent) if the picklist is dependent; NULL if not dependent. |
| ControllingFields | Full hierarchy of controlling fields (from immediate parent upwards), shown as a chain (e.g. County__c > Region__c). |
| ControllerIndex | Internal index assigned to controlling field values, used by Salesforce to map dependencies. |
| Value | API value of the picklist option. |
| Label | Display label shown to users for the picklist value. |
| ValidFor | List of controlling value indexes that this picklist value is valid for (used to define dependency mappings). |
| DefaultValue | Whether the picklist value is the default for the field within the given Record Type (1 = default, 0 = not default). |
