Edit Selected Records
Overview
The Edit Selected Records interaction allows users to perform bulk updates on multiple rows simultaneously. When this action is triggered—either via a Header or Row action—a modal opens, prompting the user to select a field and specify a new value.
The component then processes the update for all currently selected records in a single backend transaction. This ensures that changes are applied efficiently across the entire selection without requiring individual record edits.
Prerequisites
The Edit Selected Records operation is exclusive to the Data Table component. This exclusivity is due to the table's specific architecture, which allows for precise row-level selection and the batching of record IDs required for native mass updates.
How to Configure Edit Selected Records interaction
Follow these steps to enable bulk editing capabilities within your Data Table.
1. Enable Selection and Map Editable Fields
Before setting up the interaction, you must prepare the table and define which fields are available for modification.
Enable Row Selection: In the Data Table property editor, ensure "Hide Checkboxes" is unchecked. This is mandatory if you intend to use mass editing via the Header.
Define Editable Fields: Within the component configuration, navigate to the Fields section. You must specify which fields are "Editable." Only fields selected here will appear in the modal popup when the user triggers the interaction.
2. Choose Your Interaction Placement
The behavior of the Edit Selected Records operation changes significantly based on its placement:
Header Action
Mass Edit: Updates all records currently checked/selected by the user.
Checkboxes must be enabled.
Row Action
Single Edit: Updates only the specific record where the action was clicked.
Does not require checkboxes; ignores other selected rows.
3. Create and Configure the Interaction
Once your actions are defined in the Properties panel, you must assign the "Edit Selected Records" logic to them via the Interactions tab.
Navigate to Interactions: Open the Interactions tab in the component builder.
Select Your Action:
For Bulk Updates: Click on the Add Header Action Click to create the interaction.
For Single Record Updates: Click on the Add Row Action click to create the interaction.
Assign the Operation:
Type: In the operation dropdown, search for and select Edit Selected Records.
Target: Ensure the target is set to the specific Header or Row action name you intend to use.

Post-Action Configuration (Optional): To improve the user experience, you can define what happens after the edit is completed or if it fails:
On Success: It is highly recommended to add a Refresh All Queries interaction to ensure the table displays the updated data immediately. You can also add a Show Toast notification to confirm the update was successful.
On Error: Add a Show Toast notification with the "Error" variant to display Salesforce validation or system error messages to the user
User Experience
When the feature is active, the end-user workflow is as follows:
Select: The user checks the boxes for the desired records.
Trigger: The user clicks the Edit button in the header or in the row action column.
Input: A popup window appears. The user selects the field to update and enters the new value.
Confirm: Upon clicking "Save," the component processes the batch update and refreshes the data view to reflect the changes.
Technical Details & Limits
Automatic ID Collection: You do not need to manually pass a collection of IDs. The component automatically identifies which rows are checked and sends those IDs to the update service.
UI Feedback: Once the user submits the changes in the mass edit modal, the Data Table performs a "silent refresh" to update the displayed values without reloading the entire page.
Error Handling: If a Salesforce validation rule or trigger prevents the update, the Data Table will catch the exception and display the error message directly to the user.
Related Operations
In addition to Mass Edit, you can use the same setup steps to enable:
Delete Selected Records: Permanently removes all selected records after a user confirmation prompt.
Duplicate Selected Records: Creates copies of all selected records with the same field values.
Last updated
Was this helpful?
