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 Screen Flow From a Quick Action

          Run a Screen Flow From a Quick Action

          Add a button to a Lightning record page that starts an active screen flow. Send the entire record or the record ID to the flow. Use a quick action to setup the button.

          Required Editions

          Available in: Lightning Experience
          View supported editions.
          User Permissions Needed
          To create actions: Customize Application
          To create flows: Manage Flow

          Create a screen flow, and optionally, have the record page send the record ID or the whole record to the flow for context. Then create a quick action on an object and configure it to run the screen flow. Then add the quick action to the Lightning record page layout.

          Note
          Note You can also use a Field Service Mobile Flow.

          Create the Screen Flow

          Create the screen flow that will collect information from your users.

          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 a screen flow.
            • From the Automation app, click New | Screen Automations | Screen Flow.
            • From Setup, click New Flow | Screen Automations | Screen Flow.
          3. Optionally, create a variable to hold the record ID or the whole record of the record page where the user clicked the button.
            The quick action automatically sends the record ID or whole record to the flow if the flow has a variable named recordId. Create the recordId variable if you want to reference the record where the user clicked the button in the flow. For example, if the quick action button is on a contact record page and you want to send an email to the contact in the flow, you need to give the flow the contact's record so the flow knows who to email.
            1. Open the Toolbox by clicking Toolbox icon.
            2. Click New Resource.
            3. For Resource Type, select Variable.
            4. For API Name, enter recordId.
              The variable API name must match this name exactly for the record ID or whole record to be sent to the flow from the record page.
            5. Set the data type and object.

              To send the whole record to the flow, for Data Type, select Record and for Object, select the object of the record.

              To send the record ID to the flow, for Data Type, select Text.
            6. For Availability Outside the Flow, select Available for input.
              Making the variable available for input let's the quick action send the record ID or whole record to this variable.
            7. Save your work.
            New input variable recordId
          4. Add and configure a Screen element.
            1. Click Add element plus icon, and select Screen.
              The Screen configuration window opens.
            2. Enter a label and let the API name autofill. For example, enter Collect Lead Details, and let the API name autofill as Collect_Lead_Details.
            3. Add screen components by dragging them from the Components list onto the screen and configuring them. For example, drag a Name screen component onto the screen to collect a first name and a last name. For Label, enter Lead Name and let the API name autofill. Then, add an Email component to collect an email address.
            4. Save your work.
          5. Add more elements to your screen flow to complete more actions. For example, add a Create Records element and use the inputs from the previous screen to create a lead.
            1. Click Add element plus icon, and select Create Records.
              The Create Records configuration panel opens.
            2. Enter a label and let the API name autofill. For example, enter Create Lead and let the API name autofill as Create_Lead.
            3. For How to set record field values, select Manually
            4. For How Many Records to Create, select One.
            5. For Object, search for and select Lead.
            6. For the Last Name field value, click Collect Lead Details, and then click Last Name.
              This sets the value of the new lead's last name to the value that's entered into the Last Name screen component on the Collect New Lead Details screen.
            7. Click Add Field and add more screen component values to populate fields in your new record.
          6. Save and activate your flow.

          For more information about flows see Automate Tasks with Flows.

          Create the Quick Action

          Create the quick action that calls the flow when the button is clicked.

          1. In Setup, click Object Manager.
          2. Search for and select the object whose records you want the quick action button to show up on. For example, search for and click Contact.
          3. Click Buttons, Links, and Actions.
          4. Click New Action.
            The new action configuration page opens.
          5. For Action Type, click Flow.
          6. For Flow, select the screen flow you created in the last section.
            If you don't see the flow you created, check that the flow is activated. Only active screen flows show in the list of flows.
          7. For Label, enter the label you want to show on the button. For example, enter Create Lead and let the Name autofill.
          8. Save your work.
            Contact Actions New Action screen showing the new quick action configuration

          Add the Quick Action to the Page Layout

          Now that your quick action is configured, add it to the page layout of the same object you created the quick action for.

          1. In the object in Object Manager, click Page Layouts.
          2. Click the name of the page layout where you want the quick action to button to show.
            The page layout opens.
          3. Click Mobile & Lightning Actions.
          4. Find your new quick action button and drag it to the Salesforce Mobile and Lightning Experience Actions section.
            The order of the buttons shown in this section is the order that's shown to the user on the record page.
            Contact Page Layout showing the Create Lead action highlighted on the Mobile & Lightning Actions Experience Actions sections

          The quick action button shows on the record page. When a user clicks the button, the screen flow runs.

          Contact record page showing the quick action button: Create Lead

          Considerations for Running Flows from Quick Actions

          Keep these considerations in mind before running flows from quick actions.

          • Only screen flows are supported.
          • The flow must be active. If you later deactivate the flow, the action doesn’t appear at runtime.
          • Quick actions running flows are available only as object-specific actions.
          • The displayed title is the action’s label instead of its flow name. We recommend that you enter the flow name as the action label. When you run a flow from a quick action, the title is always displayed even if you configure the flow to hide the header.
          • The quick action’s screen-level help text isn’t available for feed-based page layouts.
           
          Loading
          Salesforce Help | Article