Navigate Everywhere – Flow Action

This builds on recent work Eric Smith did to expand the range of navigation choices available in a single, straightforward navigation action for Flow. Navigate Everywhere should be able to replace all of the previous navigation components. It provides support for navigation from a flow to:

  • a record page (in edit or view mode)
  • a new record form for an object
  • a list view (object home page)
  • a web page
  • a related object list view
  • an App page
  • a custom Tab page
  • a named page (examples include ”home”, “today”, “chatter” and a variety of community named pages)
  • a Knowledge page

Note that this navigation component is still constrained by some basic limitations constraining navigation in Flow Builder. This will work in normal lightning experience flows, including flows launched from Quick Actions, but will not work when run from inside Flow Builder or via a Custom Button. It will not work from Visualforce pages.

Supported Destination Types

Destination Type = ‘Object’

Will navigate to a New record form or a List view. Note the use of DestinationActionFilter to pass in the name of a specific list view.

Destination Type = ‘Record’

Navigates to a specific recordId in either view or edit mode.

Set Destination Action to ‘edit’, ‘view’, or ‘clone’.

Don’t use this Destination Type if you’re trying to create a new record (Use Destination Type = ‘Object’). DestinationActionFilter is not used.

Destination Type = ‘App’

Navigates to an app. For DestinationName, use either the appId or appDeveloperName to the appTarget. The appId is the DurableId field on the AppDefinition sObject. The appDeveloperName value is formed by concatenating the app’s namespace with the developer name. To find the app’s developer name, navigate to the App Manager in Setup and look in the Developer Name column. For standard apps, the namespace is ‘standard__’. For custom apps it’s ‘c__’. For managed packages, it’s the namespace registered for the package.

DestinationAction and DestinationActionFilter are not used.

Destination Type = ‘URL’

Navigates to a specific url. Use the DestinationURL field.

DestinationName, DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘NamedPage’

Navigates to a specific Named Page. Use the DestinationName field.

In Lightning Experience and the Salesforce mobile app, possible values are:

  • home
  • chatter
  • today
  • dataAssessment
  • filePreview

In Communities, the value for pageName is the URL value for a supported page. For instance, the default URL value for the Account Management page is /account-management, so the value for pageName would be account-management. The value of home is reserved for the landing page of any community in your org.

Supported pages in Communities are:

  • Home
  • Account management
  • Contact support
  • Error
  • Login
  • Top Articles
  • Topic Catalog
  • Custom pages

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘tab’

Navigates to a specific tab. Use the DestinationName field and provide the unique name of a CustomTab. Visualforce tabs, web tabs, Lightning Pages, and Lightning Component tabs are supported.

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘knowledge’

Navigates to a knowledge page. Destination URL is required. The value of the urlName field on the target KnowledgeArticleVersion record. The urlName is the article’s URL. DestinationName is ignored for Communities but required otherwise. Use the ArticleType API name of the Knowledge Article record for DestinationName.

DestinationAction, and DestinationActionFilter are not used.

Destination Type = ‘relatedlist’

Navigates to a related items page. Requires 1) a RecordId 2) a DestinationName like Case, 3) a RelationshipName like CaseComments and 4) a DestinationAction (which here has to be view)

Attributes

AttributeTypeNotes
DestinationTypeStringAllowable values include ‘object’
DestinationNameStringWhen DestinationType is ‘object’, this must be an object name like ‘Account’ or ‘MyObj__c’.
DestinationActionStringWhen DestinationType is ‘object’, supported values are ‘list’, ‘new’, and ‘home’.
When DestinationType is ‘record’, supported values are ‘view’, ‘edit’ and ‘clone’
DestinationActionFilterStringWhen DestinationType is ‘object’ and DestinationAction is ‘list’ or ‘home’, this allows the specification of a specific list view by name. Example ‘mycustomlistview’
Destination URLString
Relationship NameStringUsed with Destination Type = relatedlist
Destination Record IdString

Install

Unmanaged Package 1.0.1 (small error message improvements)

Old Versions

Unmanaged Package 1.0

View Source

Source

23
Leave a Reply

avatar
10 Comment threads
13 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
16 Comment authors
FrankRachel BeachTim LomisonAlex EdelsteinBruce Perry Recent comment authors
  Subscribe  
Notify of
Mark Riley
Guest

Any other documentation on this flow action?. I cant get it to work and I am uncertain as to how the inputs should be configured. I am getting the following error: C:NAVIGATEEVERYWHERELFA (LOCAL ACTIONS): NavToRecentItems Inputs: destinationName = Cash_Flow_Period__c destinationType = Object Error Occurred: This flow contains local actions, so this flow runs only in Lightning runtime. I want the flow to finish on the tab for the custom object Cash Flow Period so the user will see the most recently created records generated by the flow. I have set the flow to execute in lightning run time. It appears… Read more »

Mark Riley
Guest

Just, discovered that I think the reason I could not get it to work is that flow was being launched from vf page which forces classic runtime. Sorry for the distraction.
Mark

Alex Edelstein
Guest
Alex Edelstein

Yeah, unfortunately the events that navigation relies on only play nice in pure Lightning.

Penny Rodie
Guest
Penny Rodie

Hi! Thank you so much for this resource, navigating to a new record form might be the answer to my problems. is there any way to prefill fields and determine record type on the record being created?

Dan Hardy
Guest

Hi Alex-

I’m getting the error message:

C:NAVIGATEEVERYWHERELFA (LOCAL ACTIONS): New_Procurement_Record
Inputs:
destinationType = {!Procurement} (true)
Error Occurred: Action failed: c:navigateEverywhereLFA$controller$invoke [component.get(…).toLowerCase is not a function]
Salesforce Error ID: 370325080-4918 (241678413)
Any ideas what I’m doing wrong?

Thanks.
Dan

Dolly Choi
Guest
Dolly Choi

I had to remove references to toLowerCase in the js controller in the component and used all lower case for my input parameters to get this to work. Ex: Destination Type = record

Felix
Guest
Felix

Hi there, great tools here 🙂 What are the exact options to navigate to a record-id? unfortunately i always get an error. the flow refers to a contact and should jump to the account after completion.

Felix
Guest
Felix

Error Occurred: Action failed: c:navigateEverywhereLFA$controller$invoke [Cannot read property ‘toLowerCase’ of undefined]

Filled fields in flow:
Destination Type: record
Destination Record Id: id of account

John
Guest
John

You need to add a value for Destination Action. Valid values are ‘edit’, ‘view’, or ‘clone’

Felix
Guest
Felix

Thank you!

Emmanuel
Guest
Emmanuel

Hallo, very useful tool! I have a small question: What are the exact options to navigate to a relatedlist? I tried with following inputs: destinationAction = view relationshipName = Proposal_Requests (it is the Child Relationship Name, but I tried also with the Object API name) destinationType = relatedlist destinationName = Opportunity destinationRecordId = {!ParentOpportunity.Id} but I received back: Error Occurred: Action failed: c:navigateEverywhereLFA$controller$invoke [Missing required data. Since you have DestinationType set to relationshiplist, you need to pass in 1) a RecordId 2) a DestinationName like Case, 3) a RelationshipName like CaseComments and 4) a DestinationAction (which here has to be… Read more »

Jacob G
Guest
Jacob G

You may have already solved this by now, but two ideas in case you want to try other possibilities for destinationRecordId:

Is ParentOpportunity a custom field/on a custom object? If so, try just the field name–probably {!ParentOpportunity__c}.

Is it possible ParentOpportunity.Id wasn’t asked for in SOQL? If so, try just {!ParentOpportunity}. (though that error usually produces a friendly email asking you to think about what you’ve done)

Good luck!

Tim Lomison
Guest
Tim Lomison

I am having a similar issue. Did you ever figure it out? In my case the parent record is on the object Customer_Dispensation__c and the Child Relationship Name in the lookup field from the child Approval Requests up to Customer Dispensation is Approval_Requests. C:NAVIGATEEVERYWHERELFA (LOCAL ACTIONS): Redirect_to_App_Req_Related_List Inputs: destinationAction = view destinationName = Customer_Dispensation__c destinationRecordId = {!recordId} (aCk21000000CfBmCAK) destinationType = RelatedList relationshipName = Approval_Requests ________________________________________ Error Occurred: Action failed: c:navigateEverywhereLFA$controller$invoke [Missing required data. Since you have DestinationType set to relationshiplist, you need to pass in 1) a RecordId 2) a DestinationName like Case, 3) a RelationshipName like CaseComments and 4)… Read more »

Tim Lomison
Guest
Tim Lomison

I got this to work by:
– Adding __r at the end of the relationship name when assigning the variables in the Action in the Flow, and
– In the component controller changing the IF under the relatedlist. I used the initial code (!destinationRecordId || !dest…) and added console logs to confirm those values were present but it was still erring. I changed it to the following and it started working: if(destinationRecordId && destinationName && destinationAction && relationshipName) {

Richard Alsobrooks
Guest
Richard Alsobrooks

is it possible for the destination to open in the same tab rather than a new tab?

Alex Edelstein
Admin

Not with this action, because the underlying PageReference interface doesn’t support it. However, if you’re trying to load a web page over the existing flow, try using https://unofficialsf.com/new-ways-to-open-web-pages-from-flow/

Dom T
Guest
Dom T

Is there a way to force the user to select a record type? Right now it just goes to the profile default record type

Alex Edelstein
Admin

There doesn’t appear to be support for this in the underlying navigation technology: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm

Bruce Perry
Guest

Didn’t realized one needs to create an action of type navigateEverywhereLFA to make use of this. I’m now able to do a destination type of record with an action of “view”. When I try edit as the action, I see a window appear briefly then I’m back in the record where I started. Am I missing something?

Rachel Beach
Guest
Rachel Beach

I got this to work for viewing a record, but I can’t figure out how to make it work for viewing a related list. In my org, Contact has a related list for custom object Biographical_Entry__c records. In the metadata for Biographical_Entry__c, I see a lookup field that looks back up to Contact and includes the following attributes: Contact__c Contact Biographical Entries Biographical_Entries Lookup To to say “go to the Biographical_Entry__c records related to Contact record held in variable myRecordIDVariable” I would think I would put: Destination Type = relatedlist Destination Action = view Destination Name = Contact Destination Record… Read more »

Rachel Beach
Guest
Rachel Beach

The text editor stripped my tags—for those attributes of the lookup field on Biographical_Entry__c:

Contact__c = fullName
Contact = referenceTo
Biographical Entries = relationshipLabel
Biographical_Entries = relationshipName

Frank
Guest
Frank

Can I navigate to the Opportunity Products Related list in edit mode using this action?