A powerful Salesforce Flow Local Action that enables navigation to virtually any page type in Lightning Experience. Originally created by Eric Smith as part of UnofficialSF.
- Navigate to records (view, edit, clone)
- Navigate to object pages (home, list, new)
- Navigate to external URLs
- Navigate to custom tabs
- Navigate to Knowledge articles
- Navigate to Experience Cloud pages
- Navigate to named pages (Home, Chatter, Today, etc.)
- Navigate to related lists
- Navigate to Lightning apps
- Support for default field values when creating new records
- Record Type selection support
- Salesforce CLI installed
- Authenticated to your target org
# For production/developer org
sf org login web -a MyOrg
# For sandbox
sf org login web -a MySandbox -r https://test.salesforce.com# Deploy to default org
sf project deploy start
# Deploy to specific org
sf project deploy start -o MyOrg
# Validate only (no deployment)
sf project deploy start -o MyOrg --dry-runThis package includes two options for navigation:
Use navigateEverywhereLFA when you need maximum flexibility with a single component.
Use these purpose-built actions for a cleaner Flow builder experience:
| Action | Description | Use When |
|---|---|---|
navigateToRecord |
View, edit, or clone a record | Opening an existing record |
navigateToNewRecord |
Create a new record | Creating records with optional defaults |
navigateToListView |
Open object list view | Showing filtered lists |
navigateToURL |
Open external URL | Linking to external sites |
navigateToApp |
Switch Lightning app | Changing application context |
navigateToRelatedList |
Open a related list | Showing child records |
navigateToNamedPage |
Go to standard/community page | Home, Chatter, Today, etc. |
- Open Setup > Flows
- Create or edit a Screen Flow
- Add an Action element
- Search for your preferred action (e.g.,
navigateToRecord) - Configure the input variables
Note: These are Local Actions, meaning they run in the browser context. They work in Screen Flows only, not in Record-Triggered or Scheduled Flows.
Navigate to an existing record in view, edit, or clone mode.
| Input | Required | Description |
|---|---|---|
recordId |
Yes | The 18-character Salesforce Record ID |
objectApiName |
No | Object API name (helps with page resolution) |
actionName |
Yes | view, edit, or clone |
Example:
Record ID: {!recordId}
Action: edit
Open a new record form with optional default field values.
| Input | Required | Description |
|---|---|---|
objectApiName |
Yes | Object API name (e.g., Account, Case) |
defaultFieldValues |
No | JSON string of field defaults |
Example:
Object API Name: Case
Default Field Values: {"Subject":"Support Request","Priority":"High"}
Building JSON in Flow: Use a formula resource:
'{"Subject": "' & {!varSubject} & '", "AccountId": "' & {!varAccountId} & '"}'
Navigate to an object's list view.
| Input | Required | Description |
|---|---|---|
objectApiName |
Yes | Object API name (e.g., Account, Opportunity) |
listViewApiName |
No | Developer name of specific list view |
Example:
Object API Name: Opportunity
List View API Name: My_Open_Opportunities
Navigate to any external URL.
| Input | Required | Description |
|---|---|---|
url |
Yes | Full URL including https:// |
Example:
URL: https://help.salesforce.com
Switch to a different Lightning app.
| Input | Required | Description |
|---|---|---|
appTarget |
Yes | App ID or developer name with namespace |
Namespace prefixes:
- Standard apps:
standard__(e.g.,standard__LightningSales) - Custom apps:
c__(e.g.,c__MyCustomApp) - Managed packages:
namespace__(e.g.,mypackage__AppName)
Navigate to a related list for a parent record.
| Input | Required | Description |
|---|---|---|
recordId |
Yes | Parent record ID |
objectApiName |
Yes | Parent object API name |
relationshipApiName |
Yes | Child relationship name |
Finding the Relationship API Name: Go to Object Manager > Child Object > Lookup Field > See "Child Relationship Name"
Example:
Parent Record ID: {!accountId}
Parent Object API Name: Account
Relationship API Name: Contacts
Navigate to standard named pages or Experience Cloud pages.
| Input | Required | Description |
|---|---|---|
pageName |
Yes | Name of the page |
isExperiencePage |
No | Set true for Experience Cloud |
Lightning Experience pages: home, chatter, today, dataAssessment, filePreview
Experience Cloud pages: home, account-management, contact-support, error, login, top-articles, topic-catalog
| Variable | Label | Required | Description |
|---|---|---|---|
destinationType |
Destination Type | Yes | The type of page to navigate to (see table below) |
destinationName |
Destination Name | Conditional | Object API name, App name, Tab name, or Page name |
destinationRecordId |
Destination Record Id | Conditional | The record ID for record-based navigation |
destinationAction |
Destination Action | Conditional | The action to perform (see table below) |
destinationActionFilter |
Destination Action Filter | No | List view filter name for object list pages |
destinationUrl |
Destination URL | Conditional | URL for web page navigation or Knowledge article URL name |
relationshipName |
Relationship Name | Conditional | API name of the relationship for related list navigation |
defaultVals |
Default Field Values in JSON | No | JSON string of default field values for new record creation |
| Type | Description | Required Variables |
|---|---|---|
record |
Navigate to a specific record | destinationRecordId, destinationAction |
object |
Navigate to an object page | destinationName, destinationAction |
url |
Navigate to an external URL | destinationUrl |
tab |
Navigate to a custom tab | destinationName |
knowledge |
Navigate to a Knowledge article | destinationName (articleType), destinationUrl (urlName) |
namedpage |
Navigate to a named page | destinationName |
experiencepage |
Navigate to an Experience Cloud page | destinationName |
relatedlist |
Navigate to a related list | destinationRecordId, destinationName, destinationAction, relationshipName |
app |
Navigate to a Lightning app | destinationName |
| Action | Description |
|---|---|
view |
Open record in view mode |
edit |
Open record in edit mode |
clone |
Clone the record |
| Action | Description |
|---|---|
home |
Object home page |
list |
Object list view (use destinationActionFilter for specific list) |
new |
New record page (supports Record Type selection) |
| Action | Description |
|---|---|
view |
View the related list |
Destination Type: record
Destination Name: Account
Destination Record Id: {!recordId}
Destination Action: view
Destination Type: record
Destination Name: Contact
Destination Record Id: {!contactId}
Destination Action: edit
Destination Type: object
Destination Name: Opportunity
Destination Action: list
Destination Action Filter: My_Open_Opportunities
Destination Type: object
Destination Name: Case
Destination Action: new
Default Field Values in JSON: {"Subject":"Support Request","Priority":"High","AccountId":"{!accountId}"}
Destination Type: url
Destination URL: https://help.salesforce.com
Destination Type: tab
Destination Name: My_Custom_Tab
Destination Type: relatedlist
Destination Name: Account
Destination Record Id: {!accountId}
Destination Action: view
Relationship Name: Contacts
Destination Type: knowledge
Destination Name: FAQ
Destination URL: how-to-reset-password
Destination Type: namedpage
Destination Name: home
Valid named pages: home, chatter, today, dataAssessment, filePreview
Destination Type: experiencepage
Destination Name: home
Valid experience pages: home, Account Management, Contact Support, Error, Login, Top Articles, Topic Catalog, or custom page names
Destination Type: app
Destination Name: standard__LightningSales
Note: For custom apps not in managed packages, use the prefix
c__(e.g.,c__MyCustomApp)
Based on Salesforce Lightning Navigation best practices:
-
Use NavigationMixin patterns - This component uses the
lightning:navigationservice which is the recommended approach over deprecated methods likeforce:navigateToSObject -
Handle errors gracefully - The component includes comprehensive error messages for missing or invalid parameters
-
Use Record Type selection - When creating new records with
destinationAction: new, the component automatically enables Record Type selection if configured on the object -
Default field values - Use JSON format for
defaultValsto pre-populate fields on new records. Values are encoded usinglightning:pageReferenceUtils -
List view filters - Use
destinationActionFilterwith the list view API name (not label) to navigate directly to filtered views
This package uses Salesforce API version 62.0 (Winter '25).
salesforce-navigate-everywhere/
├── force-app/
│ └── main/
│ └── default/
│ ├── aura/
│ │ ├── navigateEverywhereLFA/ # All-in-one action
│ │ ├── navigateToRecord/ # View/edit/clone records
│ │ ├── navigateToNewRecord/ # Create new records
│ │ ├── navigateToListView/ # Object list views
│ │ ├── navigateToURL/ # External URLs
│ │ ├── navigateToApp/ # Lightning apps
│ │ ├── navigateToRelatedList/ # Related lists
│ │ └── navigateToNamedPage/ # Named/community pages
│ └── lwc/
├── config/
├── scripts/
├── sfdx-project.json
└── README.md
- Original Author: Eric Smith
- Source: UnofficialSF Lightning Flow Components
- Record Type selection enhancement: Jonathan Muller
MIT License - See LICENSE for details.