function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adrian van Wyk 8Adrian van Wyk 8 

Trying to open new Salesforce console tab from a lightning component


I have a lighting component with a few buttons on it that I have added to my users home page in the lightning app builder.

These buttons need to launch various flows in new primary tabs in their Salesforce Console. I am aware that one can use a visual force page and use the intergrations toolkit. However the problem is that VF is rendered in an iFrame on the console home page which doesn't allow the JS to interact with the parent window. So when I attempt to execute the sforce.console.openPrimaryTab() function it doesn't do anything.

Is there a way to launch the VF page in a new tab using a lighting component button. I have tried force.navigateToURL but that just opens it in the home tab which I don't want.

Below is my code which is yeilding no result
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
    <html xmlns="" xmlns:xlink="" lang="en">
            <meta charset="utf-8" />
            <meta http-equiv="x-ua-compatible" content="ie=edge" />
            <meta name="viewport" content="width=device-width, initial-scale=1" />
            <apex:slds />
            <script src="/support/console/40.0/integration.js" type="text/javascript"></script>
            	function openTab()
                	sforce.console.openPrimaryTab(undefinded, '/flow/' + flow, true, 'New Bike');
        <div class="slds-scope">
            <div class="slds-border--bottom slds-m-bottom--medium">
                <h1 class="slds-page-header__title slds-m-right--small slds-align-middle slds-truncate" title="Flow Launcher">
                    Flow Launcher
            <div class="slds-m-top--medium">
                <button class="slds-button slds-button--brand" onclick="openTab()">Link 1</button>
                <button class="slds-button slds-button--brand">Link 2</button>
                <button class="slds-button slds-button--brand">Link 3</button>


Any help would be great thanks.
Marc D BehrMarc D Behr
Hi Adrian,

I have a similar situation, I have a page that I want to have open a new tab when using the new Service Console and it appears that it is unable to properly detect that you are using Lightning and do the right thing. Looking around a bit, I found this - which indicates that the features that we need are currently in Pilot, so you need to be among the 'select few' to be able to even test the functionality. :-(