Forms using lightning screen flows

#Admineloper

This month, I have been working on setting up forms using Flows that can be used in Salesforce Communities. Why Flows and not a form builder tool from the AppExchange? Flows have form builder capabilities (drag and drop, prefill), can run in Salesforce Communities and most importantly, it is a tool available in Salesforce that works well with Salesforce data. For the particular form that I was working on, there was no payment processor set up needed. It was a data collection form. No requirement for form links to be sent in an email, electronic signatures and other bells and whistles that come with a Form Builder.

The features listed below are not new but this is the first time I have played around with them and found that an Admin can do this too without any developer knowledge. This post will walk you through what I found.

Progress Bar Feature

ProgressBar.png

When  you have a long application form, the best option is to break it into multiple screens in flows. But when you do that, to indicate to  the applicant at which point of the application they are and to provide a logical flow for the data intake, the progress bar feature is really useful.

Using the Stage functionality available in Salesforce Flows, you can easily set up the Progress Bar feature to display the various stages visually. The Salesforce developer team has provided the code for the Progress Bar lightning component here. You can create your lightning component in minutes using it. 

Follow the following steps to build your progress bar.

  •  Identify the different stages for your business process. 

  • Create ‘Stage’ type resources for each business process stage you have identified. Just make sure you set the  Order numbering right. Order defines the sequence of the stages.  Navigate to Manager> New Resource and create a resource of type Stage.

unnamed+(3).png
unnamed+(4).png
unnamed+(5).png

That's it! You have it working now. Don't forget to do a debug run.

unnamed+(7).png

Lookup Component

I have used the lookup component before to pull records related to another object, like contacts related to an account . When you want the lookup to work for records of an object, it was time consuming for me to identify what should be the Field API Name. I tried using the Id field and that did not work.  It took me quite a bit to find out that “MasterRecordId” is a field that is available on every object and we can use that. Field API Name should be a field that already exists in your Org. More on MasterRecordId in the next post.

Screen+Shot+2020-07-31+at+11.39.55+AM.png

Record Id field is useful when you use Flows for Forms because it can be used to prefill the field

What I learnt?:

Can we use it to display all contacts within an account? No. The lookup component does not have that capability and also does not respect the filters that you define in the lookup field.

Previous
Previous

Top 5 Summer ‘21 features that Admins should watch out for

Next
Next

Our top 5 features in Salesforce Winter '21