top of page

Trailhead Challenge - Guide users through creating a lead

In this article I will guide you to pass the challenge with easy step guide. So lets get started : -


Challenge : Build a flow that creates a lead with user-entered information and uploads a related file for the lead. Then add the flow to a Home page.


Before You Start

  • In Setup, go to Process Automation Settings

  • Select Enable Lightning runtime for flows and Save. Follow below screenshot.



Challenge requirements :


Create a flow:

  • Label: New Lead

  • Type: Screen Flow

Add a screen:

  • Label: Lead Screen

Add two text fields to the New Lead screen:

  • Label: Last Name

  • Label: Company Name

  • Mark both text fields required


To create a flow Go to Quick Find Box -> Flows-> New Flow. The screen will look like this.


Choose the screen flow and click on Create button. The flow Builder will look like below image.

Now start adding your screens as per challenge requirements.



Add a Create Records element:

  • Label: Create Lead

  • Select: Use separate variables, resources, and literal values

  • Object: Lead

  • Use the screen fields to set the Lead's Last Name and Company.

For this you drag a screen component and place it on to the builder and screen will look like below image. In Screen Components, click Text and then click Text again and name them.

Next add create records Element to the builder and fill out all the properties.


Use the screen fields to set the Lead's Last Name and Company.


Add a second screen:

  • Label: Component Screen


Add a screen component to the second screen:

  • Choose the File Upload screen component

  • API Name: Upload_File

  • File Upload Label: Upload Related Files

  • Related Record ID: Use the Lead ID from Create Lead.

  • For Allow Multiple Files, select {!$GlobalConstant.True}

Set all the values as shown in below image and then click Done.


Activate the New Lead .

Go back to flow as shown in below image and Click on Activate button at the right corner of your screen.


Create a new Lightning page:

  • Type: Home Page

  • Label: Process Automation Home

  • Page Template: Standard Home Page

  • Add a Flow component that references the New Lead flow

  • Activate the page and assign it as the org default.

Now, to create a lightning page Go to Quick Find Box -> Lightning App Builder -> Click New. The below image will appear. Select Home Page and click Next.



Next take flow component and drag it to the page. Label the properties as per below image. Save the changes and click on Activate button to activate the page.

That's done. click Home to view the lightning page. It will look like this :-

Fill the details and click on Next and below screen will appear that will ask you to upload files:-


Your challenge is finished.

2,946 views0 comments
bottom of page