Big Idea or Enduring Question:
How do you add a Flow to the Lightning Record Page?
Flow can be run through custom action, Custom button, the flow URL, a Lightning page, a Visualforce page, etc. In this article Add Record to Multiple Chatter Groups – Parsing Multi-Select Picklist fields (Flow) I have promised to discuss the way to execute a flow from the lightning record page.
In the past, I have written a few articles related to the Chatter Group and Record. Why not check them out while you are at it?!
- Getting Started with Salesforce Flow – Part 26 (Automatically Add a Record to Chatter Group)
- Getting Started with Process Builder – Part 42 (Auto remove a record from Chatter Groups)
In this blog post let’s discuss how to add a flow in the lightning page to distribute to Lightning Experience or Salesforce app Users.
This blog post will help us to understand the following
- Add a flow to the lightning record page
- define the filter condition to show the flow to specific users
Business Use Case
Brenda David is working as a System administrator at Gurukul on Cloud (GoC). She has created a flow that allows their sales users to add an opportunity to multiple Chatter Groups. She has the following requirements:
- Make the flow accessible from the Opportunity lightning record page
- Flow is only available for users who have the Standard User profile
Automation Champion Approach (I-do):
Any active screen flow can be added to a lightning page. In the scenario, we will add a ScreenFlow which we created in this article to an opportunity lightning record page.
Things to Remember:
- Only active screen flows are available to be added to the lightning record page.
- By default, flows display in one column.
- Flow’s input variables appear only if they allow input access.
- Pass record ID into this variable – This option is available only for Text input variables in Record pages. For simplicity, I recommend passing the ID to only one variable.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
- Create a Screen Flow
- Add flow to the opportunity lightning record page and add filter criteria
Step 1: Create a Flow
Please go through this article first and make sure to complete the listed steps: Add Record to Multiple Chatter Groups – Parsing Multi-Select Picklist fields (Flow)
Step 2: Add a Flow to Opportunity Lightning Record Page and Add Filter Criteria
The next step is to distribute a flow to Lightning Experience or Salesforce app users, by embedding it in the Opportunity Lightning record page.
- Click Setup.
- In the Object Manager, type Opportunity.
- Select Lightning Record Pages, click on the Label to open the page.
- Click on the Edit button to open a Lightning page in the Lightning App Builder.
- From the Lightning Components pane on the left, drag the Flow component onto the Lightning page canvas.
- Input the following information:
- Click Done.
Once everything looks good, click the Save button.
Proof of Concept
Now onwards, Sales users (with profile Standard User) can this tool and add an opportunity record to multiple Chatter Groups.
I want to hear from you!
What did you learn from this post, is it relevant to you, and how will you modify the concepts taught in the post for your own business processes?
Make a post and tag me on Twitter @automationchamp, using #AutomationChampion.