View Categories

Metadata Picklist by RecordType

1 min read

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 #

ParameterPurpose
@ObjectNameSalesforce Object Name (for example Account).alternatively pass “All” to retrieve all Objects.
@EnvSQL Sales Environment Name, see Setup
@Special1Future use, not currently used
@Special2Future 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 NamePurpose
ObjectNameThe Salesforce object the picklist field belongs to (e.g. Account, Opportunity).
RecordTypeIdUnique Salesforce ID of the Record Type the picklist values apply to.
RecordTypeNameName of the Record Type (e.g. Master, Customer, Partner).
FieldNameAPI name of the picklist field
ControllingFieldImmediate controlling field (parent) if the picklist is dependent; NULL if not dependent.
ControllingFieldsFull hierarchy of controlling fields (from immediate parent upwards), shown as a chain (e.g. County__c > Region__c).
ControllerIndexInternal index assigned to controlling field values, used by Salesforce to map dependencies.
ValueAPI value of the picklist option.
LabelDisplay label shown to users for the picklist value.
ValidForList of controlling value indexes that this picklist value is valid for (used to define dependency mappings).
DefaultValueWhether the picklist value is the default for the field within the given Record Type (1 = default, 0 = not default).

Leave a comment

Your email address will not be published. Required fields are marked *