Thursday, December 3, 2026 | London 11°C · Drizzle
DailyGlimpse

AI

Build a Dynamic HTML Table of Related Records in Salesforce Flow

CRM Tutorials Library 2 min read

In this tutorial, you'll learn how to create a dynamic HTML table of related records within a Salesforce Flow. The process uses a Get Records element to retrieve the related data, a text variable to store the HTML content, and Assignment elements to build the table row by row. This approach is ideal for displaying lists of related records—such as contacts linked to an account—directly on a Flow screen without any code.

Step-by-Step Guide

  1. Create a New Screen Flow in Salesforce Setup.
  2. Add a Get Records element to fetch the related records. For example, retrieve all Contacts related to the current Account.
  3. Create a Text variable (e.g., htmlTable) to hold the HTML string.
  4. Add Assignment elements to concatenate HTML tags and record field values into the text variable. Build the table structure with <table>, <tr>, and <td> tags. Use a loop (e.g., a For Each or a schedule-triggered loop) to append each record's data.
  5. Display the HTML table on a Flow Screen component by setting it to render as rich text or HTML.
  6. Save and activate the Flow.

This method gives you full control over the table's appearance and ensures that only the relevant records are shown. It's a powerful technique for admins and developers who want to present related data in a clean, readable format without Visualforce or Lightning Web Components.

Tip: Use CSS styling within the HTML string to customize colors, borders, and fonts directly in the Flow.

React