Delete Selected Records
The Delete Selected Records interaction deletes the records the user has selected in the data table.
Overview
The Delete Selected Records interaction deletes one or more Salesforce records selected by the user. Use this interaction only on components that have the option to select items, such as the Data Table.
Configuration
On Success
The interactions to execute when the records are deleted successfully. Accepted interactions are: Show Toast, Flow Navigation, Refresh All Queries and Fire Confetti.
On Error
The interactions to execute when the record deletion fails. Accepted interactions are: Show Toast, Flow Navigation, Refresh All Queries and Fire Confetti.
Asking for Confirmation
Because deleting records is a permanent change, you may want to ask the user to confirm before the deletion runs. To do so, nest the Delete Selected Records interaction inside an Open Confirm interaction: the confirmation dialog is displayed first, and the deletion only runs when the user clicks "OK". The nested variant offers the same On Success and On Error settings. Outside of an Open Confirm interaction, use the standard Delete Selected Records interaction directly.
Example
Imagine a Data Table listing open tasks with selection enabled. A header action lets the user select several tasks and delete them in one click. On success, a Refresh All Queries interaction removes the deleted rows from the table immediately, and a Show Toast interaction confirms the deletion. On error, a Show Toast interaction with the Error variant surfaces the Salesforce error message.
Last updated
Was this helpful?
