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

Add Custom Buttons

Put a Log Call button and an edit icon on every Opportunity row, so sales reps act on a deal right from the pipeline table.

A sales rep works through open deals every morning. After each call they want to log it straight away, and now and then fix a field on the deal. A visible button on each row does both from the table, and every click knows which Opportunity it belongs to.

Opportunity table with a Log Call button and an edit icon on every row
Every row carries its own Log Call button and edit icon.

Before you start

  • A Data Table on the Opportunity object with a Query data source. See Data Table to set one up.

  • For the Log Call button: an active Screen Flow with a Text input variable named recordId, marked Available for input in Flow Builder.

  • Several actions that should share one compact menu instead? Use Define Row Actions.

Steps

1

Add a button column

  1. Select the Data Table on the canvas and stay on the Properties tab.

  2. Under Columns, click Add Columns and choose Custom: a button is not tied to a field.

  3. Turn on Custom Label and enter Log as the Label. Leave the label empty if you prefer a header with no text.

  4. Check the column Name. It fills in from the label and must be unique in the table.

  5. Set Type to Button.

2

Configure the button

Under Type Attributes, set:

  • Label: Log Call, the text shown on the button.

  • Name: log_call. The interaction listens to this name, so a button without a Name cannot be wired.

  • Variant: Brand.

  • Icon Name: utility:call, with Icon Position on Left.

Column settings of a Button column with label, name, variant and icon
The Name set here is what the interaction listens to.
3

Add an icon button for quick edits

Each button column holds one button. Add a second Custom column for the edit icon:

  • Type: Button Icon.

  • Icon Name: utility:edit.

  • Name: edit_deal.

  • Variant: Border.

  • Alternative Text: Edit opportunity, read by screen readers.

4

Open the flow when Log Call is clicked

  1. Open the Interactions tab and add an interaction under Row Action Click.

  2. Target Name: log_call.

  3. Type: Open Flow Dialog, then pick your flow in API Name.

  4. Under Input Variables, add an item: Name recordId, then for Value pick the row's Id from the Record entries (the field then reads Record: Id), and set Type to Text. This passes the row that was clicked.

  5. Modal Header: choose Custom, then enter Log a call: {{Record.Name}} in the field below.

  6. Under On Finish, add Refresh Query so the table shows what the flow changed.

See Open Flow Dialog for the other settings.

Row Action Click interaction opening a flow with the row Id as input
The flow receives the Id of the row that was clicked.
5

Open the record in edit mode from the icon

Add a second interaction under Row Action Click:

  • Target Name: edit_deal.

  • Type: Navigate.

  • Page Reference Type: Record Page.

  • Object Api Name: Opportunity. Record Id: the row's Id from the Record entries. Action Name: Edit.

See Navigate for the other destinations.

6

Save and test

Save the component and open the page where it is placed. Each row shows a blue Log Call button and a pencil icon. Click Log Call on one deal: the flow opens with that deal's name in the header. Click the pencil: the edit form of that same Opportunity opens.

Troubleshooting

My button does not appear in Target Name

Target Name lists the Name of each button, button icon and row action. Open the column, check that Name is filled under Type Attributes, then come back to the interaction.

The flow variable is missing from the Name list

Only variables marked Available for input in Flow Builder are offered. Edit the variable in your flow, tick the option, activate a new version, then reopen the interaction.

The flow opens but receives no record

Map Value from the Record entries, which hold the row that was clicked. First Selected Row follows the selection checkboxes, so it stays empty unless the user also ticked that row.

Export does nothing since I added the button column

A known issue affects tables with a button, button icon or action column when the query returns more rows than the table has loaded. See the Troubleshooting section of Enable Data Export.

Last updated

Was this helpful?