Page Layout Related Lists (from the Metadata API)
Pull Page Layout Related List configuration per Object, including related lists, fields, and display settings, for all Objects or a specified Object.
Results are loaded to table ss_SysLayoutRelatedList
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_MetaLayoutRelatedList 'DEMO', 'All'
Example of Use - Single
exec ss_MetaLayoutRelatedList 'DEMO', 'Account'
ss_SysLayoutRelatedList table
Column Name | Purpose |
ObjectName | Salesforce object the layout belongs to |
LayoutFullName | API name of the layout (typically ObjectName-LayoutName) |
LayoutName | User-friendly name of the layout |
RelatedListNumber | Sequence number of the related list within the layout |
RelatedList | API name of the related list (e.g. RelatedContactList, RelatedActivityList) |
CustomButtons | Custom buttons included on the related list (if defined) |
ExcludeButtons | Buttons explicitly excluded from the related list |
FieldPosition | Position of the field within the related list column layout |
FieldName | Field displayed in the related list (often in object.field format) |
SortField | Field used to sort the related list records |
SortOrder | Sort direction (e.g. Ascending or Descending) |
ButtonsDisplayed | Which standard buttons are displayed on the related list |
Columns | Number of columns shown in the related list layout |
Rows | Number of rows displayed in the related list |