Skip to main content

SLAM_data_dictionary

Overview

Downloads complete field definitions for all (or filtered) Salesforce objects to table DATA_DICTIONARY. The results bypass field level security restrictions.

tip

Unlike SLAM_describe_fields which is limited to permissioned objects and fields, SLAM_data_dictionary returns every field from every object regardless of the connected user's permissions. This makes it ideal for building complete org-wide data dictionaries.

info

Field attributes are returned under two prefixes:

  • part.* — sourced from Tooling API, providing global-scope metadata not subject to field-level security. Attributes like part.IsCreatable and part.IsUpdatable reflect the org-wide field definition.
  • desc.* — sourced from the Describe API, reflecting the connected user's permissions. Attributes like desc.createable and desc.updateable are user-scoped and may be null where the user lacks access.

Parameters

NameTypeDefaultDescription
@sObjectsVARCHAR(MAX)NULLComma-separated list of Salesforce object names to include. If NULL, retrieves fields for all objects in the org
@exists_actionVARCHAR(20)NULLControls the behavior when the destination table DATA_DICTIONARY already exists. If NULL, uses the value from SLAM_Settings.default_exists_action (defaulted to 'drop' during initial setup).

Valid options:

  • 'drop' - Drop the existing object and create a new one (default)
  • 'rename' - Rename the existing object by appending a timestamp suffix (format: _YYYYMMDDTHHMMSS_MMM)
  • 'fail' - Throws a SQL exception if the destination object already exists

Usage Examples

Retrieve field metadata for all objects:

EXEC dbo.SLAM_data_dictionary;

SELECT * FROM data_dictionary;

Filter to specific objects:

EXEC dbo.SLAM_data_dictionary @sObjects = 'Account,Contact,Opportunity';

With explicit exists action:

EXEC dbo.SLAM_data_dictionary
@sObjects = 'Account,Contact',
@exists_action = 'drop';

Key Columns

ColumnDescription
sObjectSalesforce object API name
NameField API name
Missing Write Field PermissionIndicates if the field is missing write permission, for createable fields

Comparison with Other Metadata Operations

FeatureSLAM_data_dictionarySLAM_describe_fields
Multiple objectsAll or filteredAll or single
Bypasses permissionsYes (part.*)No
User-scoped attributesYes (desc.*)Yes
Picklist valuesYesYes
PerformanceFast (parallelized)Fast (parallelized)