View Categories

Metadata Field

2 min read

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 #

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_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 NamePurpose
ObjectNameAPI name of the Salesforce object the field belongs to
ObjectLabelUser-friendly label of the object
ObjectReplicateableIndicates if the object supports replication (e.g. via APIs)
ObjectQueryableIndicates if the object can be queried via SOQL
FieldNameAPI name of the field
FieldLabelUser-friendly label of the field
DataTypeSalesforce data type of the field (e.g. string, picklist, reference, number)
LengthMaximum character length (for text-based fields)
ByteLengthStorage size in bytes for the field
PrecisionTotal number of digits for numeric fields
ScaleNumber of decimal places for numeric fields
UpdateableIf the field can be updated via API (1 = yes, 0 = no)
CreateableIf the field can be set on record creation
UniqueIf the field enforces unique values
NillableIf the field can be left blank (nullable)
CustomIf the field is custom (1) or standard (0)
FilterableIf the field can be used in query filters (WHERE clause)
SortableIf the field can be used in ORDER BY clauses
DependentPicklistIf the field is a dependent picklist
DeprecatedAndHiddenIf the field is deprecated or hidden from use
EncryptedIf the field is encrypted
ExternalIdIf the field is marked as an External ID
NameFieldIf the field is the primary name field for the object
PermissionableIf field-level security can be applied
ReferenceToLists the object(s) this field references (for lookup/master-detail fields)

Leave a comment

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