Skip to content
Home » News and articles » Redirection to a record from a Salesforce Flow

Redirection to a record from a Salesforce Flow

One of the most desired features in Salesforce Flows is the ability to redirect users to newly created records. For instance, when a record is created via a screen Flow, redirecting users seamlessly enhances their experience. The ideal solution should be:

  • Reusable: Once created, it can be used in any new Flow without the need for redevelopment.
  • Easy to Use: Avoid creating external addresses or links every time a new record is created. The solution should be accessible directly from within a Flow via an Action component.

Let’s create a fast and straightforward solution to redirect users to any record from a Flow by developing a new Action using a Lightning component in Salesforce.

Step 1: Open the Developer Console and create a new Lightning Component.


Step 2: In the component section, add the following code:

Step 3: In the controller section, add the following code:

Component section

Step 4: In the design section, add the following code:

Design section

Step 5: Save all components, close the Developer Console, and ensure everything is properly configured. As per Salesforce documentation, this Action is now ready to use in a Flow.

Step 6: Create a Flow for record creation. Add an Action component, search for your newly created Action, and configure it. Simply set the input value (recordId) for the desired redirection and save the Flow. Once the Flow interview is complete, users will be redirected to the specified record – such as the newly created one.

If you’d like us to build similar solutions in your Salesforce org, feel free to contact us! No project is too small, and we also offer full consultancy packages at discounted rates.