Have you ever come across a situation in Flow where you wanted to redirect your users to newly created record but did not know how to handle/configure/implement it?
Yep, pretty frustrating memory – who could forget? Well, thanks for reading my blogs; for, you’re in luck! Using different use cases, I have written around a hundred articles on Lightning Flow to guide users on how to use Lightning Flow Designer. You just landed at the right place to learn about it.
This Solution will only work in Lightning Experience.
By default, when a flow finishes, (1) a new interview starts and users see the first screen of the flow; or (2) you can redirect users either to an old record or to the record from where s/he started the flow.
In this article, I am going to show you how, you can create a Lightning component, that calls Flow Local Action to redirect users to newly created record.
Before we move ahead, let us understand what is a ‘Flow Local Action’ and, its power.
When you use Lightning components as flow actions, you can execute actions in the client-side (browser) rather than going through the Salesforce server. Like Lightning Components, Flow Local Actions executes on your device in the browser. For example, you can perform the following actions:
- Open a newly created record in another browser tab
- Open a list view
- Display pop-up alert
- Play Sound (For example, when an opportunity is closed-won)
- Use Camera of the laptop/workstation
- Reload the web page
- Open a URL in another window or tab
- Get the data from a third-party server without going to Salesforce server etc.…
Once you configure the Lightning component markup; (i) client-side controller; and, (ii) design resource, appear in the Lightning Flow Designer as a Local Action.
Today, in this article, I am going to show you how you can create a Lightning component that calls Flow Local Action to redirect the user to the newly created lead record. Read the rest of this entry!