How To Pass Record IDs From List View To Salesforce Flow (Video 5:04)

At times you want to invoke a flow from the list view on an object and pass the record IDs of selected records for bulk processing. For example, you may want to allow users to close multiple cases in one go or delete multiple case records. Or you may want to add multiple contacts to an event.

(Please note that as of the date of this blog post, you can select a maximum of 200 records only from the list view)

Invoking a Flow directly from a list view and passing the IDs of selected records offers a convenient solution for handling bulk operations. This functionality empowers you to leverage the rich, native & declarative features of Flow, even for complex business requirements.

By efficiently processing multiple records, you can elevate the efficiency & productivity of your users.

Build the Flow

  1. Create a new Screen Flow.

  2. Add a text variable with the API name ids (all lowercase — the flow won't receive the IDs otherwise). Check Available for input and Allow multiple values.

  3. Add a Get Records element on Case where Case ID is In the ids variable, and store all records.

  4. Add a Screen with a Data Table that shows the retrieved cases (for example, Case Number, Subject and Created Date).

  5. Save and activate the flow, then copy its URL from the flow's detail page.

Add the List View Button

  1. In Object Manager → Case → Buttons, Links, and Actions, create a new button.

  2. Set Display Type to List Button and check Display Checkboxes so users can select multiple records.

  3. Set the content source to URL, paste the flow URL and add a retURL parameter so users return to the Case list view when the flow finishes.

  4. Edit the List View Button Layout and move the new button to Selected Buttons.

  5. Open the Cases tab, select a few records and click the button. The flow opens with the selected cases in the data table.

From here, process the selected records however your business requirement needs — as simple or as complex as you like.