View Categories

Metadata Picklist

1 min read

Picklist Metadata (from the Tooling API) #

Pull a simple list of Picklist values per Object, or optionally just a single specified Object’s picklists (see ss_PicklistX for a more involved data pull, takes slightly longer to process).

Results are loaded to table ss_SysPicklist

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_MetaPick 'DEMO', 'All'

SQL-SALES ss_SysPicklist run date: 2023-11-09 ——————-

23:29:32: Using Env|Schema: DEMO|dbo

23:29:32: Starting ss_SysPicklist retrieval for: All Objects

23:29:34: Connection method BULK & SOAP API

23:29:34: Drop existing ss_SysPicklist if exists and recreate

23:30:57: Load to dbo.ss_SysPicklist

—————————————————————–

Example of Use – Single #

exec ss_MetaPick 'DEMO', 'Account'

SQL-SALES ss_SysPicklist run date: 2023-11-09 ——————-

23:37:52: Using Env|Schema: DEMO|dbo

23:37:52: Starting ss_SysPicklist retrieval for: Account

23:37:55: Connection method BULK & SOAP API

23:37:55: Drop existing ss_SysPicklist if exists and recreate

23:37:58: Load to dbo.ss_SysPicklist

—————————————————————–

ss_SysPicklist table #

Column NamePurpose
ObjectNameSalesforce object the picklist field belongs to
FieldNameAPI name of the picklist field
ValueAPI value of the picklist option
LabelDisplay label shown to users for the picklist value
ActiveWhether the picklist value is active and available for use (1 = active, 0 = inactive)
DefaultValueWhether the picklist value is the default for the field (1 = default, 0 = not default)

Leave a comment

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