Is it possible to launch a Lightning page that was created in the Lightning App builder (composed of two sibling components) from the button click of another custom component? Any help would be greatly appreciated. Thanks

Controller code is shown below:

  openApp: function(component, event, helper) {
    var workspaceAPI = component.find("workspace");
        focus: true

    }).then(function(response) {
            tabId: response
               console.log("The recordId for this tab is: " + tabInfo.recordId); 
    }).catch(function(error) {

2 Answers 2


Actually with Summer 18, the preferred method is to start using the Navigation API. See here:


Use openTab() and openSubtab() with a lightning:isUrlAddressible component to open custom Lightning components in Lightning console apps.

Relevent release notes here:



FYI: A huge benefit of this is if you've created a lightning app container just to house a component (because previously, that was the only way to navigate to a specific component on a full page), you can now use the navigation API to navigate to only the component (no un-necessary app container!).

For example, this is a valid url in the address bar now

  • This is the way to go but still force:navigateToURL event is useful because sometimes, we might want to navigate from component to the app built by admins. By that way admins are free to improve app by adding more and more components. Jul 2, 2018 at 17:39
  • @KiranMachhewar in that case, I think you can still navigate to the app with the following name c__MyAppBuiltByAdmins. See here: developer.salesforce.com/docs/atlas.en-us.214.0.lightning.meta/…
    – tsalb
    Jul 2, 2018 at 17:49
  • Interesting.. Lets say you create app page named TestApp, basically its a flexi page not aura bundle. Do you have any working example for that, have you tried and tested it with Lightning app builder's app page ( flexi page )? I would love to see this in action, please share some code example. Jul 2, 2018 at 20:04
  • @KiranMachhewar no sample needed, I just read the docs in further detail. You would use: standard__navItemPage and the attributes apiName: "TestApp"
    – tsalb
    Jul 2, 2018 at 20:48
  • Let me give a try, once I get time Jul 2, 2018 at 23:33

Yes, Just grab the relative url of the page created by Lightning App builder and use the workspace API to navigate.

Consider the app name is TestApp

Code should look like:

In component add :

       "url": "/lightning/n/TestApp" 

  • Thanks Kiran, I've tried implementing your suggestion but it doesn't seem to be working. The relative URL I'm inputting seems to be the problem as the function doesn't compute to'true', to allow the 'then' clause to proceed. Any suggestions?
    – DimzeeD
    Jul 2, 2018 at 14:09
  • What do you mean by function doesn't compute to true? Jul 2, 2018 at 14:11
  • Did you wrap the url in single quotes? Jul 2, 2018 at 14:12
  • I've added my Controller code to the question above for clarity
    – DimzeeD
    Jul 2, 2018 at 14:27
  • @DimitriosKolovopoulos Apologies, previous solution was only working with Console App, your app is using standard navigation so please change the code as above and it should work now. I just tested it. Jul 2, 2018 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .