Skip to main content

SLAM_describe_fields

Overview

Downloads detailed field definitions for all objects to table DESCRIBE_FIELDS.

warning

The list of fields returned is subject to Salesforce permissions. Only the objects and fields the user has read access or greater to in Salesforce are returned.

Parameters

NameTypeDefaultDescription
@sObjectVARCHAR(120)NULLSpecific Salesforce object name to retrieve field metadata for. If NULL, retrieves fields for all objects
@tableVARCHAR(256)'DESCRIBE_FIELDS'Destination table name
@exists_actionVARCHAR(20)NULLControls the behavior when the destination table 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

EXEC dbo.SLAM_describe_fields;

SELECT * FROM DESCRIBE_FIELDS;

For a single object:

EXEC dbo.SLAM_describe_fields
@sObject = 'Account';

SELECT * FROM DESCRIBE_FIELDS
WHERE sObject = 'Account';

With a custom destination table:

EXEC dbo.SLAM_describe_fields
@sObject = 'Account',
@table = 'ACCOUNT_FIELDS';

SELECT * FROM ACCOUNT_FIELDS;

With explicit exists action:

EXEC dbo.SLAM_describe_fields
@exists_action = 'rename';