I'm hoping to override/refresh a particular subtab if it already exists, or open it as a new subtab if it doesn't exist yet.

However I can't seem to find a way to get subtabs by name. The console integration toolkit gives you sforce.console.getSubtabIds(...) but the resulting IDs don't tell me whether its the particular subtab I need.

Any help/suggestions?

  • How did you determine which subtab based on the below answer? – cartman Sep 12 '19 at 15:33

Uou can use openSubtab() method, which creates as well as overrides subtab.

sforce.console.openSubtab(primaryTabId , 'http://www.salesforce.com', false, 'salesforce', null, openSuccess, 'salesforceSubtab');

Opens a new subtab (within a primary tab) that displays the content of a specified URL, which can be relative or absolute. You can also override an existing subtab. Use to open a new subtab on a primary tab via the primary tab's ID. This method is only available in API version 20.0 or later.

You can Refer the same in Salesforce Developer's Guide

  • I don't understand how does this help determine the tab that he wants to refresh on? @jmrjulian – cartman Sep 12 '19 at 15:27

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.