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
Nitish Singh 22Nitish Singh 22 

sforce.console.openSubtab opening a new tab and not overriding the existing tab

I have a button on vf page which clicked opens Contact in a new SubTab.  See below



User-added image

Every time a new subatb is openned . I want to overrite the existing tab.

i am passing the SubTabID to override still it is not overriding :

 sforce.console.openSubtab(primaryTabId ,'003/e?retURL=%2F001g000001VnaTA&accid={!ct_SelectedContact.AccountId}', true,
                                     'New Contact', newtabID, openSuccess, null);

newtabID is the ID of the subtab to override
NagendraNagendra (Salesforce Developers) 
Hi Nitish

May I suggest you please check with below links from the stack exchange community which might help you accelerate further. Hope this helps.

Thanks,
Nagendra
 
Nitish Singh 22Nitish Singh 22
@Nagendra
 User-added imageI am referring to the this documentation : https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_opensubtab.htm

It suggests that if I pass ID of a subtab , the newly opened tab will override on the passed TABID & not create a new tab. But I am not able to achieve this behaviour as it always opens a new tab.

Refer attached screenshot