I have one Aura component which has button, I need to open few urls (for time being take it as hardcoded url as Google, Ping , Facebook) within sale console window adjacent to each other.

I want that when I click this button, my Aura component should automatically open these 3 websites in next tab within same console window.

I tried Windows.open with _self and _open but nothing worked

  1. You have to use Lightning Console JavaScript API for your usecase. Please go through Salesforce Console Developer Guide and learn more about Lightning Console API.
  2. The lightning:workspaceAPI component allows you to access methods for programmatically controlling workspace tabs and subtabs in a Lightning console app. For more info, check this link: https://developer.salesforce.com/docs/component-library/bundle/lightning:workspaceAPI/documentation.

You can refer the code below to open a subtab. You have to customize the code based on your requirements.

const workspaceAPI = component.find("workspace");
    .then(function(tabId) {
        return workspaceAPI.openSubtab({
            parentTabId: tabId,
            url: path,
            focus: true
    .then(function(subTabId) {
            tabId: subTabId,
            label: fileName

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.