I have build a simple lightning component something like :

<aura:component implements="force:appHostable,flexipage:availableForRecordHome,force:lightningQuickAction">
   Hello World

I have added a lightning action for this page on record home page, let say to be on "Account"

Whenever I click on that lightning action from any account record, it open lightning component in lightning modal. Is there any way to redirect user to standalone "lightning tab" like page instead of lightning modal?

  • Why not use a "custom button" with "content source"=URL instead (if all you want is to open a different page)? Jan 31 '17 at 15:33
  • I have tried that approach too, Using this way, I am not able to pass recordId to lightning component Feb 1 '17 at 6:12
  • Why not? which page are you trying to open? can you post the code you have tried with? Feb 1 '17 at 6:14
  • I might not be able to post complete code as its too big and convulated. But I can give you the gist of the issue <aura:component implements="force:appHostable,flexipage:availableForRecordHome,force:lightningQuickAction"> <aura:attribute name="id" type="Id"/> </aura:component> In js controller logic, I need to access this id attribute to fetch data from apex controller. Button url is something like /c/mycomp.cmp?id=a00N000000G8bvEIAR The issue is that I am unable to access this id in js controller of lightning component Feb 1 '17 at 6:50
  • Will I be able to use URL custom button on salesforce1? Feb 1 '17 at 6:53

I managed to open the lightning component in as a tab instead of the popup by using a small component which will redirect to the main component.

You can use the force:navigateToComponent event on init to navigate to your main component.

  • i tried using navigateToComponent and it's opening in a tab but the same screen. How did you manage to open in a new tab instead? Aug 3 '17 at 16:47


    implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId, forceCommunity:availableForAllPageTypes, force:lightningQuickAction">
    <aura:handler name="init" action="{!c.navigateToeDiscoverySearchCmp}" value="{!this}" />


    navigateToeDiscoverySearchCmp : function(component, event, helper) {
        var evt = $A.get("e.force:navigateToComponent");
            componentDef : "c:eDiscoverySearchCmp",
  • We can also add attributes like : componentAttributes: { contactName : component.get("v.contact.Name") }
    – Srujan
    Apr 18 '19 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.