Last Updated on February 10, 2022 by Rakesh Gupta
Check out my previous articles:
- Want to be an Early Adopter of the New Flow Builder? Welcome Aboard!
- Getting Started with Salesforce Flow Designer– Part 1 (Understand, Create & Use Variables in Flow)
In the aforementioned articles, I have discussed the new Flow Builder tool – introduced by Salesforce in Spring’19 release and some basics concepts of Flow – to help you better understand the elements of a flow builder. If you didn’t get a chance to read it yet, do it now! It will significantly improve your knowledge of Salesforce Flow. Once you master the art of leveraging Salesforce Flow, you will be able to easily create an optimized flow!
In this article, we will discuss the following topics:
- What is a Screen Element?
- What is the purpose of a Screen Element?
- How to create a Screen Element?
- Explore different ways to call Flow with Screen Element.
What is a Screen element?
A Screen Element bestows power on Salesforce Flow by making it more robust compared to the Process Builder. You might be thinking how and why? Let’s see through a business use case.
Business Use Case
Edward Backhouse is working as System administrator at GurukulOnCloud. Edward received the following requirement from his manager – create a lead capture form which looks like the following screenshot:
Later Edward has to put this form on the Home Page Layout and open it for the entire world.
A solution for the above business requirement
If you are a Salesforce Developer, who knows how to create a Lightning Component, fulfilling the above requirement would be a piece of cake for you. But if you don’t have development experience, it might be a nightmare for you. Even though you may know how to write code in Salesforce, it is best practice to first try and see if you can conjure up a declarative solution.
Here, we can use Salesforce Flow and Screen Element to solve the above business requirement. Let us start by understanding the role of a Screen Element. A Screen Element allows you to take users’ input and process it – yes, one can write custom logic to process user entered data. That’s the power of Salesforce Flow – as oppose to Process Builder that doesn’t have the capability to take user input and process it.
I hope now you understand the power of Screen Element. Let’s take the discussion further and understand how you can create a screen with few fields in Salesforce Flow. Perform the following steps to create the solution using the new Flow Builder:
- Log-in into your developer org.
- Navigate to Setup (Gear Icon) | Setup | Process Automation | Flows.
- You’re now in the Flow management page. Based on your current org setting, you may see the following buttons:
- New Flow – Use this button to create a Flow in the new Flow Builder.
- New Flow in Flow Designer – Use this button to create a Flow in the classic (old) Cloud Flow Designer.
- Now click on the New Flow button; it will open the Flow canvas for you.
- Next, we will use the Screen element to create a lead capture form. Drag and drop a Screen element onto the canvas. And then, follow the steps as shown in the video:
- Now if you want to add colorful flavor to your Flow then, watch the following video (this is a hidden gem and Salesforce Flow doesn’t support!!!):
- The next step is – add two Text fields (Last Name and Company) to Screen Element. Then, drag and drop the field onto screen element – Check out the video for step-by-step instructions and some tips:
- Now we will add one Lightning Component field – which allows users to enter an email address. Check out the video for step-by-step instructions and some tips:
- Once you’re done, Save the flow and name it Lead Form v1, with Type: Screen Flow. Do not forget to activate the Flow by clicking on the Activate button.
- Woohooo, you have just created a Flow using Flow Builder.
Different ways to call Flow which contains Screen element
There are at least twenty ways (that I know) to call a Flow. When you use Screen Element (which is a Screen Flow), you still have tons of options. A Screen Flow can be launched using one of the following ways:
- Using Flow Component in Lightning Record Page
- Using Flow Component in Lightning App Page
- Using Flow Component in Lightning Home Page
- Using Flow Component in Lightning for Outlook
- Using a Custom Button
- Using a Custom Link
- Embed a Flow in Visualforce Page
- Using Login Flow
- Using Inline Visualforce Page
- Using Quick Action
I have added a link for each of the options – so that you can explore and learn more. Happy learning!!!!
Proofreader: - Munira Majmundar