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
Rakesh KumarRakesh Kumar 

openPrimaryTab not getting focus on to already open tab in Service console

If the record was already opened manually from other view (with manual click), and then click on the link, we will not get focus on to that tab
if we open the record through the link and when go click on the same link we will getting the focus.

function openPage(url,name){
    if(sforce.console.isInConsole()){ 
        sforce.console.openPrimaryTab(undefined,url, true, name);
    } else { 
        window.open(url,'_parent'); 
    }
}

reproduce
1. Click on VF link ( List of record )
2. back to detail page of link
3. Click link of same record again 
4. Check debug log and you will find error  'openPrimaryTab: Opening a duplicate tab is not allowed.'

Thanks in Advance
NagendraNagendra (Salesforce Developers) 
Hi Rakesh,

Sorry for this issue you are encountering.

May I suggest you please check with below link from the stack exchange community exactly with a similar discussion which might help you further. Please let us know if this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Rakesh KumarRakesh Kumar
Hi Nagendra,

Thanks for information.
I tried to use above method but it is still not working. I am facing same issue.

Hope we will have different workaround for same.

Thanks
Rakesh