How to add clickable buttons
Overview
This tutorial guides you step-by-step through adding row-level action buttons to an Avonni Data Table within a Dynamic Component. You'll learn how to create buttons in each table row and trigger actions related to that specific record. Examples include buttons to Edit, Delete, View Details, or launch a custom process (like a Screen Flow).
Guided Tutorial
Follow these steps to add a column of action buttons and configure what happens when a user clicks them.
Phase 1: Setup and Configuration
Define the Buttons (Row Actions)
Scroll down to the Type Attributes or Row Actions section within the column settings.
Click Add Item for each button you want to appear (e.g., create one item named "Edit" and another named "Delete").
Important: Assign a unique Name (ID) for each item (e.g.,
edit_action,delete_action). You will need these names in Phase 2.Optional: You can set icons (like
utility:edit) or variants (likedestructive) to style the buttons
Phase 2: Add Logic with Interactions
Row Actions and Buttons in Avonni Dynamic Components do not work automatically; you must define an "Interaction" to tell the system what to do when a specific button is clicked.
Switch to the Interactions Tab: At the top of the Component Builder properties panel, click the Interactions tab.
Add a New Interaction: Click Add Interaction.
Set the Trigger:
Target: Select the specific Row Action Name you defined in Phase 1 (e.g.,
edit_action).Trigger: Ensure this is set to On Row Action.
Choose the Action:
Type: Select the action you want to perform. Common examples include:
Navigate: To go to a standard Salesforce page (like the Record Edit page).
Open Flow Dialog: To launch a Salesforce Screen Flow in a modal.
Configure the Action Details:
Example (Edit Record):
Type: Navigate
Page Reference Type: Record Page
Action Name: Edit
Record ID: Click the value field and simply select Record Id from the dropdown list. This maps the navigation target to the specific record ID coming from your Data Table.
Example (Launch Flow):
Type: Open Flow Dialog
Flow: Select your custom Flow.
Input Variables: Map your Flow's
recordIdvariable to Record: Id from the Data Table
Save: Click Save to apply your changes.
Troubleshooting: Missing Flow Input Variables?
To see a variable in the Name dropdown menu, you must first ensure that the variable is marked as Available for input inside your Salesforce Flow Builder settings. If you do not see your variable listed, check your Flow configuration to confirm this setting is enabled
Phase 3: Test Your Component
Save the Component and exit the Builder.
View the page in Salesforce.
Click the button in one of the table rows and verify that the correct action (e.g., the Edit modal opens for that specific record) triggers
Interactive Guided Tutorial
Last updated
Was this helpful?
