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

Add row and header actions

Add a row menu and a header button to a screen flow Tree Grid, then log a call, open a record or hand the clicked account to the rest of the flow.

An account manager reviews a customer group in a screen flow. Each subsidiary gets a small menu: Log a Call opens a short flow on that account, View Account opens its record, and Escalate moves the flow on with the account she picked. Above the grid, a Plan Review button sends every account she ticked to a review flow.

Tree Grid of a customer group with the row menu open on Meridian UK showing Log a Call, View Account and Escalate, and a Plan Review button in the header
A row menu on every account and one header button for the ticked rows.

Before you start

  • A screen flow with a Tree Grid on the customer group's accounts, using the Query data source. Show an account hierarchy sets it up. Refresh Query and the record operations are only offered with Query.

  • An active screen flow Log_a_Call with a Text variable recordId, Available for input checked, that creates a Task on that account.

  • An active screen flow Plan_Account_Review with a Text collection variable accountIds, Available for input checked.

  • The examples use the API Name AccountTree for the Tree Grid.

Steps

1

Add an Action column

  1. Select the Tree Grid and click Open Component Builder.

  2. In the Properties tab, under Data Mappings > Columns, add a column and choose Custom instead of Object Field.

  3. Set Name to actions and Type to Action.

The column has no field behind it. It holds the menu, on every row of the tree.

2

List the actions of the menu

In the column's Type Attributes, under Row Actions, add one entry per menu item:

  • Label: what the user reads, Log a Call.

  • Name: what the interactions and the flow use. It fills in from the Label and rejects special characters. Set it to log_call.

  • Disabled and Hidden are optional, per entry.

Add View Account (view_account) and Escalate (escalate) the same way. Menu Alignment sets where the menu opens.

Column settings with Type set to Action and three row actions listed under Row Actions
The Action column and its three row actions.
3

Log a call from the row

  1. Go to the Interactions tab and add a Row Action Click interaction.

  2. In Target Name, pick Log a Call. The list shows every row action by its label.

  3. Set Type to Open Flow Dialog and pick Log a Call in API Name (the list shows flow labels). Modal Header sets the dialog title.

  4. Under Input Variables, add an item: Name recordId, Value Record: Id (the Id of the row the user clicked), Type Text.

  5. Under On Finish, add Refresh Query so the grid reloads when the dialog closes.

Row Action Click interaction opening the Log a Call flow with the row's Id and a Refresh Query on finish
Log a Call opens a flow on the clicked account, then reloads the grid.
4

Open the record

Add a second Row Action Click, Target Name View Account:

  • Type: Navigate, then Page Reference Type: Record Page.

  • Object Api Name: Account. Record Id: the row's Id. Action Name: View.

5

Hand the clicked account to the flow

Some changes belong in the flow, with your own checks. For Escalate:

  1. Add a third Row Action Click, Target Name Escalate, Type Flow Navigation, then Next Screen.

  2. After the screen, add a Decision: {!AccountTree.clickedRowActionName} Equals escalate.

  3. On that path, a Create Records on Task: Related To ID (WhatId) = {!AccountTree.clickedRowActionKeyValue}, Subject = a Text formula "Escalation review: " & {!AccountTree.clickedRowActionRow.Name}.

  4. Connect the path back to the Tree Grid screen.

The three row outputs are filled on every row click:

Output variable
Reference
What it returns

Clicked Row Action Name

{!AccountTree.clickedRowActionName}

The Name of the action, escalate

Clicked Row Action Key Field Value

{!AccountTree.clickedRowActionKeyValue}

The Id of the clicked row

Clicked Row Action Row

{!AccountTree.clickedRowActionRow}

The clicked record, for its other fields

One Decision can route several actions this way.

6

Add a header button for the ticked accounts

  1. In the Properties tab, open the Header group. Under Actions, add an item: Label Plan Review, Name plan_review, Icon Name utility:event.

  2. In the Interactions tab, add a Header Action Click interaction, Target Name Plan Review, Type Open Flow Dialog, API Name Plan Account Review.

  3. Under Input Variables: Name accountIds, Value Selected Row Key Values, Type Text, with Allow Multiple Values (collection) on.

Selected Row Key Values carries the Ids of the ticked rows. If the button sends the flow to the next screen instead (Flow Navigation), read Clicked Header Action Name ({!AccountTree.clickedHeaderActionName}) after the screen to know which button was clicked.

7

Save and test

Click Done, save the flow and run it with Debug. Every row ends with a menu button. Log a Call opens the dialog on that account, and the grid reloads when it closes. View Account opens the record page. Escalate moves to the next screen, the Decision takes the escalate path and the Task appears on the account. Tick two accounts and click Plan Review: the review flow opens with those two Ids.

What a row action can run

Each Row Action Click or Header Action Click runs one Type. The most useful ones:

Type
What happens
Data source

Runs another screen flow in a modal or a side panel

Any

Opens a record page, an object page or a URL. A record page replaces the flow

Any

Moves the flow to the next screen, back, pause or finish

Any

Show Toast, Open Alert Modal, Open Confirm Dialog

Shows a message, an alert or a confirmation

Any

Edit Selected Record(s), Delete Selected Record(s), Duplicate Selected Record(s)

Edits, deletes or copies the record

Query

Reloads the grid

Query

Troubleshooting

The action is missing from Target Name

Target Name lists the Row Actions entries that have a Name. A Button or Button Icon column is a target too, listed by its own Name, which stays empty until you fill it.

Edit, Delete or Refresh Query is not in the list of types

Those types need the Query data source. With Manual, the rows have no Salesforce record behind them.

The second flow opens but receives no account

Check that its input variable is marked Available for input, that its data type matches the Type of the interaction item (Text for an Id, a Text collection for Selected Row Key Values), and that Value is a Record: entry for a row action.

The user lands on the record page and the flow is gone

Navigate on a row action replaces the flow. Use Open Flow Dialog or Flow Navigation when the user must stay in the flow.

Was this helpful?