Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Run a Flow from a Custom List View Button

          Run a Flow from a Custom List View Button

          Add a custom button to a list view that starts an active autolaunched flow or screen flow. Send the IDs of the selected list view records to the flow. Use the flow's web address (URL) to set up the button.

          Required Editions

          View supported editions.
          User Permissions Needed
          To open, edit, create, activate or deactivate a flow using all flow types, elements, and features available in Flow Builder, including Einstein and Agentforce for Flow: Manage Flow

          If you have a collection variable in your flow that's named "ids" and is available for input, the list view automatically sends the IDs of selected records to the flow. You can use those IDs to perform actions on those records. Use the flow's web address (URL) to set up the button.

          Note
          Note List views can send 95 or fewer IDs to a flow.

          Create the Flow

          Create an autolaunched flow or screen flow to launch from the button. Optionally, you can send the IDs of the selected records to the flow. To send the record IDs to the flow, so the flow knows what records to work on, create a flow collection variable called ids to hold the IDs.

          1. Open the Flows list view.
            • From Setup, in the Quick Find box, enter Flows, and then select Flows.
            • From the Automation app, select the Flows tab.
            • From the Flows tab in any Lightning app, click the actions menu and select Open Flow.
          2. Create an autolaunched flow or a screen flow.
            1. From the Automation app, click New. Then select Autolaunched Flow (No Trigger) or Screen Flow.
            2. From Setup, click New Flow. Then select Autolaunched Flow (No Trigger) or Screen Flow.
            Flow Builder opens.
          3. Optionally, add an input variable to your flow to pass selected record IDs from the list view to the flow.
            1. Click Open toolbox, and then click New Resource.
            2. For the Resource Type, select Variable.
            3. For API Name, enter ids.
              The variable must be named "ids" for it to work.
            4. For Description, enter Stores the IDs of the records selected in the list view that are passed into the flow.
            5. For Data Type, select Text.
            6. Click the box to select Allow multiple values (collection).
            7. For Availability Outside the Flow, select Available for input.
            8. Click Done.
          4. Optionally, add more variables to store additional input values that are sent to the flow when it runs. Learn about adding input values, in addition to the record IDs, to the URL in Send Variable Values to a Flow Using the Flow's URL.
          5. Add elements to your flow to perform the actions you want.
            For example, if the flow has the IDs of the contacts sent into the flow, you can use other elements to update those records or send emails.
          6. Save the flow.
          7. Test the flow by clicking Debug and using test data.
          8. Activate the flow.
            1. Click Activate.

          Get Your Flow's URL

          1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
          2. For the flow that you want to run, click Show actions, and select View Details and Versions.
          3. Copy the flow's URL.
            The format of the URL is /flow/My_Flow.

          Create a Custom List Button

          1. From Setup, click Object Manager.
          2. Click the object that you want to add a list view button to. For example, Contact.
            The object window opens.
          3. Click Buttons, Links, and Actions.
          4. Click New Button or Link.
          5. Give the button a label and name.
          6. For Display Type, select List Button.
          7. Leave the default values for the remaining fields.
          8. In the large text box, enter your flow's URL, and then add /lightning to the start of the URL.
            The full text looks like /lightning/flow/My_Flow.
          9. Save your work.
          Note
          Note We recommend using Lightning experience and adding /lightning to the beginning of your flow URL. However, if you don't add /lightning to the flow URL, it still works, you just don't get the new benefits of running in Lightning. To learn more, see Choosing Between Lightning and Non-Lightning Flow URL Formats.
          An open custom list button configuration window showing the selections described previously
          Note
          Note Optionally, you can customize what happens when the flow ends. To learn more, see Customize Flow Finish Behavior.

          Add the Button to the List View Button Layout

          1. Click List View Button Layouts.
          2. Click the action dropdown for the layout that you want to add the button to, and click Edit.
          3. Under Custom Buttons, add your button to the Selected Buttons list.
          4. Save your work.

          Now users can go to the object's list view, select records, and then click the button you created. The list view sends the selected record IDs to the flow and then the flow runs.

           
          Loading
          Salesforce Help | Article