Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Compare Records Side by Side with Record Grid

Put an account's open opportunities side by side in a screen flow, one column per deal, so a manager can compare amounts, stages and dates at a glance.

A rep asks for a discount on one of an account's deals. Before approving, the sales manager wants that account's three open opportunities next to each other: amount, close date, stage, probability. A Record Grid turns each opportunity into a column and each field into a row, so the manager reads the same figure for every deal along one line.

Record Grid titled Open deals with three opportunities as columns and Amount, Close Date, Stage, Win chance, Opportunity Type and Lead Source as rows
Three open deals of one account, compared field by field.

Before you start

Steps

1

Get the opportunities to compare

Add a Get Records element before the screen:

  1. Object: Opportunity.

  2. Filter: AccountId Equals {!recordId}, and IsClosed Equals {!$GlobalConstant.False}.

  3. Sort Order: Ascending by CloseDate. The grid shows the records in this order, left to right.

  4. How Many Records to Store: All records.

  5. How to Store Record Data: Automatically store all fields.

The grid runs no query of its own, so the manager sees exactly what this element returns.

2

Bind the grid to the collection

  1. Add an Avonni Record Grid to the screen, give it the API name Deal_Grid, and select it. The Edit Record Grid Component panel opens.

  2. At the bottom of the Properties tab, set Data Source to Variable. A new grid starts in Manual.

  3. In Records Collection, pick the output of the Get Records element.

3

Head each column with the deal name

In Data Mappings, set Column Header Field to Name. Each column now opens with the deal's name.

4

Add one row per field to compare

Under Row Fields, click Add Row Fields for each field, in the order the manager reads them: Amount, Close Date, Stage, Probability (%), Opportunity Type, Lead Source.

In each entry, pick the field in Field. Type fills in from the field (Currency for Amount, Date for Close Date, Percent for Probability), so leave it as it is. To rename a row, turn on Custom Label and type the new text in Label, for example Win chance for Probability. The entry keeps its field name in the panel list; the new label shows on the grid. Use Help Text for a short note shown next to the row label, such as Probability from the current stage.

Record Grid property editor with Data Source set to Variable, Column Header Field set to Opportunity Name and the Probability entry open under Row Fields, showing Type Percent, Custom Label Win chance and a help text
Variable mode: the collection, the column heading, and one Row Fields entry opened.
5

Label the grid

In the Header group, set Title to Open deals. In the Properties tab, set Row Label Header to Field: it fills the empty top-left cell above the row labels.

With three deals, the default Records Per Page of 5 shows them all on one page. An account with more open deals gets chevrons in the header to page through the rest.

6

Save and test

Save the flow and run it from an account with open opportunities, or click Debug and enter an account Id in recordId (Test a screen flow that needs a record ID).

The screen shows one column per open opportunity, headed by its name and ordered by close date. Six rows run across them, from Amount down to Lead Source, with amounts as currency and Probability as a percentage, under Win chance if you renamed it. The row labels stay pinned on the left when the grid scrolls sideways.

To let the manager adjust Amount, Close Date or Stage right in the grid and save, continue with Edit and save values in a Record Grid.

Troubleshooting

The grid is empty

The Get Records element found nothing, so the collection is empty when the screen opens. Check that recordId holds an account Id (in Debug, the input variable must be filled), and that the account has opportunities that are not closed. Check also that Records Collection points at that element's output.

Column headings or a row are blank

The field is not stored on the records. This happens when the Get Records element uses Choose fields and let Salesforce do the rest and the field is missing from its list. Add every field used in Column Header Field and Row Fields, or switch to Automatically store all fields.

The deals appear in the wrong order

The grid keeps the order of the collection. Change the Sort Order of the Get Records element.

Was this helpful?