Skip to main content

ss_MetaField

Extract Salesforce field metadata including data types, lengths, permissions, and attributes. Ideal for data modelling, schema analysis, governance, ETL design, and understanding object structure across your Salesforce org (from the Tooling API)

Updated this week

Field Metadata

Pulls all Salesforce object fields and their core attributes, including data types, lengths, permissions, and behavioural flags, enabling full visibility of the data model for reporting, integration, and governance

Note, results will be affected by the Field Level Security (FLS) of the user connecting to Salesforce, if you wish to see an alternative view of Fields, unaffected by FLS see ss_MetaFieldX.

Results are loaded to table ss_SysField

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

SQL-SALES ss_SysField run date: 2023-11-09 ----------------------

23:15:07: Using Env|Schema: DEMO|dbo

23:15:07: Starting ss_SysField retrieval for: All Objects

23:15:09: Connection method BULK & SOAP API

23:15:09: Drop existing ss_SysField if exists and recreate

23:16:57: Load to dbo.ss_SysField

-----------------------------------------------------------------

Example of Use - Single

exec ss_MetaField 'DEMO', 'Account'

SQL-SALES ss_SysField run date: 2023-11-09 ----------------------

23:22:56: Using Env|Schema: DEMO|dbo

23:22:56: Starting ss_SysField retrieval for: Account

23:22:58: Connection method BULK & SOAP API

23:22:58: Drop existing ss_SysField if exists and recreate

23:23:00: Load to dbo.ss_SysField

-----------------------------------------------------------------

ss_SysField table

Column Name

Purpose

ObjectName

API name of the Salesforce object the field belongs to

ObjectLabel

User-friendly label of the object

ObjectReplicateable

Indicates if the object supports replication (e.g. via APIs)

ObjectQueryable

Indicates if the object can be queried via SOQL

FieldName

API name of the field

FieldLabel

User-friendly label of the field

DataType

Salesforce data type of the field (e.g. string, picklist, reference, number)

Length

Maximum character length (for text-based fields)

ByteLength

Storage size in bytes for the field

Precision

Total number of digits for numeric fields

Scale

Number of decimal places for numeric fields

Updateable

If the field can be updated via API (1 = yes, 0 = no)

Createable

If the field can be set on record creation

Unique

If the field enforces unique values

Nillable

If the field can be left blank (nullable)

Custom

If the field is custom (1) or standard (0)

Filterable

If the field can be used in query filters (WHERE clause)

Sortable

If the field can be used in ORDER BY clauses

DependentPicklist

If the field is a dependent picklist

DeprecatedAndHidden

If the field is deprecated or hidden from use

Encrypted

If the field is encrypted

ExternalId

If the field is marked as an External ID

NameField

If the field is the primary name field for the object

Permissionable

If field-level security can be applied

ReferenceTo

Lists the object(s) this field references (for lookup/master-detail fields)

Did this answer your question?