Navigate to Record

(There is another, more recent version of navigation with additional functionality. See it here.)

This is a generic Lightning Flow Action Component that can be used at the end of a Flow to load a Salesforce Record page. Unlike the Navigate to SObject component, you can specify whether to open the record in Edit or View mode.

Created by Eric Smith – September 2019

I wrote this component to solve the issue raised in this idea:

NavigateToSObject improvement request (#180)

Installation

Production

Sandbox

Manual Installation

In your Developer Console, select File > New > Lightning Component > Name: navigateToRecord > Submit

Then select File > Save All

Source Code

Parameters

The component takes three parameters

  • Object – SObject Type of the Record (Account, Case, Opportunity, Custom__c, etc)
  • Record ID – Record Id of the record to display (This can be the Id of a new record created in the Flow)
  • View or Edit? – Default (View), Select what mode you want to be in when switching to the record.

Setup

Drag the Action Element onto your Flow Canvas, select navigateToRecord and provide Input Values for the 3 parameters. If this element is the last one in your Flow, the user will be redirected to the defined record screen in the selected mode.

Important Operations Notes

This flow action does NOT work when run from Flow Setup. It ONLY works when run on a Lightning Page.