Screen Flow

 

Simple Screen Flow to get the Candidate Feedback (Detail) on Candidate(Master) screen 

As we know, screen flows can be used to create screens that is surfaced to the users in lightning pages , mobile devices etc. for user interaction where user can fill the some details and proceed further.

This can provide a way to guide users through a business process. This can provide instructions, prompt users to complete certain fields, and then perform actions behind the scenes such as Record Create or Record Update. The user(s) will move through a series of screens that you have created – all without you having to write a single line of code. (Scenario depends on the business requirement)

Lets create a simple screen flow which will allow the User to create records by just filling up certain set of values within a screen.

Here, we will be putting the screen flow on Candidate page. The Candidate is the name of the Master object and we also have a custom object named Candidate Feedback with some custom fields (Candidate Feedback is name of the Detail object). So, 'Candidate Feedback' is related to the 'Candidate' with Master-Detail relationship.

In Candidate Feedback custom fields we have 'Details' (long text area), 'Needs Escalation' checkbox, 'Rating' picklist field. The standard field Name is a Auto Number here and we have master detail field 'Candidate' here, which is the master-detail field with Candidate as the master.


Please note, the below description is explanation for the video or visual attached below.


Lets create the Screen Flow:


Setup | Flow | New flow (Select Flow while creating)

The place where you land on click of create is called the flow canvas, left hand side we have the toolbox, in the toolbox we have the elements that is, these are things we can do. Using Manager, we can add resources as per our need.

Drag and drop the screen element to the canvas. Now we can start building the screen. On click of the white box you can see the properties and change as per need lets call it 'Candidate Feedback Screen'(add description - optional but good to add).

In the left hand side, we see the different components that can be added to the screen.

Lets add the display text, which is just for the user information. Name it may be, displayText (Use some Announcement emoji with the text - Please feel out project feedback)

Drag and Drop Details (long text area) lets call it - Details (please set - no default value) since we want the user to fill it up.

Also we want to know if this feedback requires escalation, so drag drop checkbox element and in properties 'Requires Escalation'

For Rating, lets use radio buttons and call it Rating and we have to define values for this radio buttons, add a resource to define the choices select picklist choice set call this ratingpicklistchoiceset (this resources returns all the values available in the Candidate Feedback's Rating picklist field an below that we are defining what value its going to be Candidate Feedback, datatype is picklist and select the picklist field from that object and now we have the option to select the picklist from the object Candidate Feedback (we can sort the values also)

Now select this new variable we created above in choice value.

We can also do some setting in screen properties like we can configure frame, control navigation etc. (we will just keep the Next/Finish button)

Done

Connect Start element to Screen element

Save and Activate

Once the user fills the out the details in the screen, based on teh details - lets create the record

Create new Candidate Feedback record (with values from the screen)

Drag drop Create element, select the object 'Candidate Feedback'

now,

'Details' from screen element will get stored in 'Details' field of 'Candidate Feedback' object

'Needs Escalation' will be stored in 'Requires Escalation' field of 'Candidate Feedback' object

'Feedback' will have 'Rating' from the screen element (what users fills up)

Now the Candidate record (that candidate record where the user is giving the feedback or we are placing this flow component) has to be stored in a place or under which Candidate, this new Candidate Feedback will be created

So, create a new Resource variable (name it - currentCandidate) which stores the Candidate Id of the Candidate on which the user is filling/ed up the screen.

Create a variable with datatype as text and we will make this available for input because we want to populate this Candidate Id from out of this flow.

Now, select that variable.

We also need a place to store the new Candidate Id within this flow so that we can use or reuse. So, create a new resource with resource type as variable name it newCandidateFeedback which stores new feedback record, datatype is text. Use this variable to store the new Candidate field.

Connect it with the previous screen element.

Save it and debug it. Activate it.




Comments