Table of Contents
Picklist Metadata (from the Metadata API) #
Pull metadata-enriched Picklist values, including field details, value set source, controlling field, and active status, per Object or for a specified Object.
Results are loaded to table ss_SysPicklistX
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_MetaPickX 'DEMO', 'All'
Example of Use – Single #
exec ss_MetaPickX 'DEMO', 'Account'
ss_SysPicklistX table #
| Column Name | Purpose |
| ObjectName | The Salesforce object the picklist field belongs to (e.g. Account, Opportunity) |
| FieldName | API name of the picklist field |
| FieldLabel | User-friendly label of the field as shown in the UI |
| FieldType | Field type (e.g. picklist, multipicklist) |
| ValueSetSource | Where the picklist values are sourced from (e.g. Local or Global value set) |
| ValueSetName | Name of the global value set if used; NULL for locally defined picklists |
| Restricted | Whether the picklist restricts values to the defined list only (1 = restricted, 0 = unrestricted) |
| Sorted | Whether the picklist values are sorted alphabetically (1 = sorted, 0 = manual order) |
| ControllingField | API name of the controlling field if this is a dependent picklist; NULL if not dependent |
| Value | API value of the picklist option |
| Label | Display label shown to users for the picklist value |
| Active | Whether the picklist value is active and available for use (1 = active, 0 = inactive) |
| DefaultValue | Whether the picklist value is the default for the field (1 = default, 0 = not default) |
