> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/enhanced-template-editor/inserting-related-lists-in-the-enhanced-editor.md).

# Inserting Related Lists in the Enhanced Editor

It is often necessary to include data from a record's related lists directly in your documents. The Related List Builder within the new enhanced editor provides a declarative, easy-to-use process to include advanced or related data from across your Salesforce organization into a template. For example, if you are building a template from an Opportunity, you can insert a related list that displays specific fields from child Quote records.

The enhanced editor provides a complete range of flexibility to simplify and declaratively construct dynamic tables, powered by related lists, right inside the templates without the need to edit any code. With simple clicks and drag & drop functionality, effortlessly adjust formatting, select object fields, and filter or sort rows by user-specified criteria.

### Activating the Related List Builder

To open the configuration panel, use the following procedure:

1. Open the document template inside the enhanced editor.
2. Navigate to the styling ribbon and click the **Insert Related List** icon ![](/files/1XBOCanPQxHGzedQD1hQ)

### Configuring Related Lists

The configuration panel is organized into four primary management sections to help grow your business and optimize your template setup.

#### Property & data configuration

This section establishes where your Salesforce information originates and how it is restricted:

{% columns %}
{% column %}

<figure><img src="/files/kK7FoaFNJqfYAAPfGzKC" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

* **Property:** Enter a custom name for your related list to quickly identify it within the template properties.
* **Data:** Select the primary Salesforce data source for your list. Choosing a source automatically enables the *Filter options* settings.
* **Filter options:** Utilize conditional building tools to restrict the records returned. Define a rule by specifying an evaluation field, selecting an operator, and entering a value to compare against that operator. Filters can be created or deleted dynamically.
* **Limits:** Specify a maximum numerical limit to constrain the total number of records returned.
* **Sorting:** Apply basic sorting criteria by selecting a field and choosing either an ascending or descending order.
  {% endcolumn %}
  {% endcolumns %}

#### Display and Rearrange Columns

The **Display** section allows you to declaratively build and sequence the columns of your data table:

* **Adding columns:** Search the *Dropdown list* to find your available fields. Click a field to add it to the panel stack.
* **Column alignment:** Fields are displayed in a single column within the panel stack. Their top-to-bottom order in the panel directly determines their left-to-right layout in the generated document table.
* **Rearranging columns:** To adjust column positioning, click, drag, and drop the fields into your preferred layout inside the stack.
* **Column settings:** Expand individual fields within the stack to view the data source, view the data type, and customize the visible display name.

{% hint style="info" %}
**Advanced Field Attributes (Column Settings)**

Within the column settings, you can modify advanced attributes to control data rendering. Select an option from the *Type* dropdown menu to apply one of the following methods:

* **None**: Applies standard, unformatted text delivery.
* **RTF (Rich Text Field):** Renders data originating from a Salesforce field that contains rich text formatting or HTML markup.
* **Text**: Forces data to display as plain text, actively stripping out any existing formatting and markup tags.
* **Checkbox**: Renders Salesforce boolean true/false data as a visual checkbox instead of printing the literal words "true" or "false".
* **Radio**: Renders Salesforce boolean true/false data as a visual radio button instead of printing the literal words "true" or "false".
  {% endhint %}

#### Table Styling & Appearance

Fine-tune the look and feel of the table container to achieve complete process optimization:

{% columns %}
{% column %}

<figure><img src="/files/cOTWJ106FK7Bx33DHMsp" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

* **Header row:** Displays the column titles at the top of your table. This row is enabled by default, but you can toggle the settings to show or hide it.
* **Color & spacing layout:** Adjust the header color, apply custom padding to table cells, and set margins or gaps around cells.
* **Row & border formatting:** Select the *Alternating row colors* checkbox to apply alternating background shading for better readability. You can also customize the border color and change the border width.

{% hint style="info" %}
The image below illustrates how the related list configured in this article appears in the enhnaced template editor.
{% endhint %}
{% endcolumn %}
{% endcolumns %}

<figure><img src="/files/JQPzjUAAVKJOe221xItB" alt=""><figcaption></figcaption></figure>

#### Deleting a Related List

If you need to remove the table from your template entirely, scroll to the bottom of the management panel and click the **Delete Related List** button from the menu or type the backspace key with the table selected.

{% hint style="info" %}
**Deletion methods are permanent** and will prompt the template author to confirm the action if they contain references to related data.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/sdocs/enhanced-template-editor/inserting-related-lists-in-the-enhanced-editor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
