You are currently viewing Configure a Record Link Dynamically in Flow

Configure a Record Link Dynamically in Flow

Sharing is caring!

Introduction

Do you know that we can configure a record link dynamically in Flow without using any extra resources or formulas? 

Yes, as we are using Salesforce, we are so lucky!!! 

Because in Salesforce, users can solve the same business problem or issues with or without code.

Here it is like we are allowing users to create a Contact record. At the end of the Flow, they want a confirmation screen that links to the newly created Contact record. This link is not static or hard coded but purely dynamic. 

First, let us understand what Flow is in Salesforce.

What is Flow in Salesforce?

Flow occupies the number one slot among the automation tools of Salesforce. It helps you to perform many things and helps to create complex business solutions with clicks only. Salesforce Flows greatly help the admins as they can manage complex business requirements without help from the developers. 

The Flow is easily maintainable and accessible through the Setup menu. Flows have three main building blocks – elements, connectors and resources. The individual building blocks of Flows are the elements, and the resources are the variables of data used in Flow. The connectors decide which elements lead into another. 

There are various instances when you require to create a link to a record within a Flow. For example, a link to the record can be displayed if it is a Screen Flow. This way, the users can navigate to the record by clicking on the link. Another interesting use case is when you want to send an email containing a record link. You create a record link in Salesforce in various ways.

Let us now cover the objectives of this post as we want to create a record link dynamically. 

Objectives

The objectives behind this post are:

  1. Dynamically create a record URL.
  2. Display a confirmation message using a clickable link to the new record.

My Flow will be like this after completion.

How to Work on Flow?

Step 1: First, we will go to Setup, and in Home will type Flows in the Quick Find Box. 

Step 2: Select Screen Flow and click on the Next button.

Step 3: Next, create a variable for storing the contact ID of the newly created contact
API Name – Contact_ID
Data type – Text
Default value – {!Contact_ID}            
Click Done

Step 4: Add a Screen to the Flow
Label – Contact Record
Configure Footer – Hide Pause and Previous Buttons and Show Finish Buttons.
Step 4.1: Select a component – Name.    
API Name – Records.    
Leave all as default. Click Done.

Step 5: Select Create Records from Element.
Label – Create a Contact  
How Many Records to Create – One
How to set the Record Fields – Use separate resources, literal values.
Create a record of this object “Object” – Contact
Set field values for the Contact Field – First Name, Value –
{!Records.firstName} Click on Add field – Last Name, Value –
{!Records.lastName} Select Checkbox – Manually assign variables.
Now Store Contact Id in the variable – {!Contact_ID}

Step 6: Add another Screen after creating a record Element.
Label – Confirmation of Creating Contact Record.
Configure Footer – Hide Pause and Previous Buttons and Show Finish Buttons.
Drag Display Text Component to the screen.
API Name – ConfirmRecord
In the textbox, enter text – You have successfully created a record.
{!Records.firstName} {!Records.lastName}      
For URL, click on the link icon and give this URL – https://cloudanalogycom-2a8-dev-ed.lightning.force.com/lightning/r/Contact/{!Contact_ID}/view
Click Done.

Finally, our Flow will look like this:

For Saving Flow: Click On Save Button
Flow Label: Creating Contact Records to configure a Record Link Dynamically
API Name: It will be auto-populated.
Click Save.

How Can We Attach our Flow to Lightning App Sales Home Page? 

While you are on the Sales Home Page, Click on Setup Icon. Click on Edit Page

  1. Drag the Flow Component to the leftmost top section of the page
  2. Select the activated Flow that you have made.
  3. Click on Save
  4. Click on Activation.

The Flow will get shown on the Lightning App Home Page in this way:

https://drive.google.com/file/d/1mSRhvCQ5uaWemekYDIM46PF8R6xAIL__/view?usp=sharing

The Outcome of the Flow

It comprises Video and Screenshots. 

Video https://drive.google.com/file/d/1vGxUQBM659iqemMp5jMLAZVmkYvvqcb0/view?usp=sharing

Click on Name, and it will redirect you to the Newly Created Record:

Conclusion 

Flow, one of the topmost Salesforce Automation tools,  performs many things. There are situations when a developer requires to create a record link in Flow with a Screen Flow then a link to the record gets displayed. So, the users can navigate to the record by just clicking on the link. 

Another use case you face is when you want to send an email with a record link. You create a record link in Salesforce in multiple ways. It is possible to configure a record link dynamically in Flow without using any extra resources or formulas.

Cloud Analogy is one of the top-notch certified Salesforce Consulting Companies that can offer you precious business advice and will help you throughout your Salesforce journey. 
We provide cost-efficient Salesforce Consulting services and best Salesforce implementation services to help your business grow in countless ways.

AJ-01

Ajay Dubedi

CEO | Founder
Ajay Dubedi, the founder and CEO of Cloud Analogy, is a prominent Salesforce Sales, Service, and Marketing cloud Consultant with a rich expertise in handling challenging business models. Ajay has assisted and implemented solutions in industries comprising Banking, Health Care, Networking, Education, Telecommunication and Manufacturing. Ajay is globally acclaimed for his extensive experience in APEX Programming, VisualForce pages, Triggers, Workflows, Page Layouts, Roles, Profiles, Reports & Dashboards.

Hire the best Salesforce Implementation Partner. Choose Cloud Analogy, the world's most preferred Salesforce Implementation Company that provides custom CRM Implementation services.

Leave a Reply

× How can I help you?