Last Updated on February 10, 2022 by Rakesh Gupta
Salesforce Flow allows us to automate business processes by building applications, known as Flows, that collect, update, edit, and create Salesforce information, and then make those flows available to the right users or systems. Flows can execute logic, interact with the Salesforce database, call Apex classes, Platform Events, and guide users through screens for collecting and updating data. There are various ways to launch a flow including:
- Custom Button/URL
- JavaScript
- Visualforce Page
- Process Builder
- Using Apex start() method
- Inline Visualforce Page
- Using the Flow URL
- As a Subflow
- Login Flow
- Embedding in a Visualforce Page
- Salesforce1 navigation menu
- Embedding in Lighting Record Page
- Embedding in Lighting App Page
- Embedding in Lighting Home Page and much more………………….
Recently Salesforce added one more way to launch a Flow – from an object-specific action (Beta).
After the recent release, you can add flows to the action menu on your Lightning pages without having to hunt down the flow’s URL. When you create a flow action, you can pick from a list of available flows rather than enter a flow’s URL manually. It does not mean flow action can call anything in your Salesforce Org. To work as a flow action, a flow must be active and have screens. Let’s start with a business use case
Business Use Case
Rachel Gillett is working as a System administrator at Universal Containers (UC). She has developed a flow to get the Sales reps’ feedback on closed opportunities. She wants to use the Opportunity object-specific action to launch it.
Solution for the above business requirement
We will use Flow and Object-specific action(beta) to solve the above business requirement. Perform the following instructions to solve the above business requirement:
- Navigate to Setup (Gear Icon) | Setup | Process Automation | Flows in Lightning Experience.
- Then click on the New Flow button – it will open the Flow canvas for you.
- Create a sample Flow (Save it with the name Survey) as shown in the following screenshot:
If you want the step-by-step guide to creating the above flow, then check out this article Survey Powered by Lightning Flow. - Save the Flow (Type: – Flow) with the name Survey and close the canvas.
- Don’t forget to activate the Flow by clicking on the Activate button.
- The next step is to create the Opportunity object-specific action to launch this flow. Navigate to Setup (Gear Icon) | Setup | Object Manager | Opportunity | Buttons, Links, and Actions and then click on the New Action button.
- The final step is to modify the page layout and add object-specific action on it, as shown in the following screenshot:
- That’s it. The next step is to test this functionality.
Proof of concept
If you have any problem with watching the video then, please click on it and open it in another tab.
Please feel free to share it with your family, friends, and colleagues!
Hi Rakesh,
My flow is not detected when I create an action. I also tried to create a button with URL but it says Flow not found.
Thanks!
Make sure that your Flow is active.
Is it possible to pass the current record id for use in the flow being called by that action?
Check out this help article.
It looks like you forgot followed the steps mentioned in this article. Long story sort, make sure to populate “PriceBookENtryID” on opportunity. Checkout this help article for more information
How do you pass input variables to the Flow using either an Action or a Button that will work in Lightning Customer Community?
Take a look at this help article.
Is it possible to get the User.Id to the flow when using a custom button in Community? something like this? but from the Community’s Custom Button, not at the object level. https://[domain].my.salesforce.com/flow/Done_with_Education_History/3013l000000Q2vbAAC?recordId={!User.Id}
How about using a Formula (then global variable $user.id) to get the loggedIn userId. Does it make sense to you?
Hi Rakesh,
This is an excellent post.
I have question regarding setting up a flow for field service mobile app.
My requirement is when a Service Appointment is marked as completed by Technician , Technician should see a Q & A flow so that Technician can update the related fields and close the Service Appointment.
So problem is since we cant invoke Screen Flows by Process Builder i tried doing this through Auto-launched flows , but the requirement is that the flow has to be invoked by user interaction.
Please advise how can we achieve this.
Thanks,
Harry
If possible to try to override the button and use Flow behind the scene.
HI Rakesh,
Is the ebook promo code still the same? “LSVWPB50”? I am trying to purchase the ebook and the promo code is not being recognized by packtpub.com any help would be appreciated!
Here is the correct code LSVWBP50