I have linked my lightning component with Quick action button, my requirement is I want to open lightning component in a new window. How should I achieve this

  • new browser tab window or as new tab in service console App?
    – sdandamud1
    Commented Aug 5, 2019 at 14:45
  • new browser tab window
    – Jill_sfdc
    Commented Aug 6, 2019 at 6:14

3 Answers 3


You should consider using lightning:navigation.

Target component

should implement lightning:isUrlAddressable

<aura:component implements="lightning:isUrlAddressable" access="global" >

Add to your quick action component

<lightning:navigation aura:id="navService"/>

And how to navigate from your quick action controller

        var pageReference = {
            type: 'standard__component',
            attributes: {
                componentName: 'c__helloTarget',
            state: {
                "c__firstname": "John"

        var navService = component.find("navService");

This code directs you to /lightning/cmp/c__helloTarget?c__firstname=John


You can create a detail page button with URL:

enter image description here



When you add this to record page layout, it will open component directly. You can also add parameters (all parameters should start with c__). Your component can read parameters through state in isUrlAddressable.

Note: This is URL hack and will work as long as URLs template dont change.

  • This opens in same window not in a new browser tab window.
    – Jill_sfdc
    Commented Aug 6, 2019 at 10:09
  • Yes true. I think this is maximum we can get upto if we dont want to see the quick action modal. If you can use quick action, you get generated URL from page reference and use window.open(URL,'_blank') Commented Aug 6, 2019 at 10:15
  • @salesforce-sas I am trying to achieve something similar here salesforce.stackexchange.com/questions/302538/… can you please help me what I am missing
    – user81642
    Commented Apr 15, 2020 at 2:12

Here are two Quick Action Button Lightning Component solutions to either open a pop-up window or new browser tab with a Visualforce Page (or whatever URL you want to redirect to):

Lightning Component:

<aura:component implements="force:lightningQuickAction,force:hasRecordId" access="global">
    <aura:handler name="init" action="{!c.openPage}" value="{!this}" />

Controller (to open pop-up window):

    openPage : function(component,event){
        var w = 1020;
        var h = screen.height-120;
        var left = (screen.width/2)-(w/2);
        var top = 0;
        var recordId = component.get('v.recordId');
        //Open Pop-up Window with Visualforce Page
        window.open('/apex/YOUR_VISUALFORCE_PAGE?id='+recordId, 'Sales Contract', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
        //Close Action Button Modal

Controller (to open new browser tab):

    openPage : function(component,event){
        var recordId = component.get('v.recordId');
        //Open New Browser Tab with Visualforce Page
        //Close Action Button Modal

You must log in to answer this question.

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