Skip to main content

ss_MetaPick

Salesforce picklist values per object, including field values and labels for reporting and SQL analysis.

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

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_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 Name

Purpose

ObjectName

Salesforce object the picklist field belongs to

FieldName

API name of the picklist field

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)

Did this answer your question?