+ Start a Discussion
S GogatiS Gogati 

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

Hi All,

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.


Here is my code

<apex:page standardController="Account">
    <apex:includeScript value="/support/console/22.0/integration.js"/>
    <script type="text/javascript">
        function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, '/0019000000lcM34?isdtp=vw', true,'TEST123', openSuccess, '0019000000lcM34');
        }
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                //alert('Primary tab successfully opened');
            } else {
                //alert('Primary tab cannot be opened');
            }
        };
     </script>
    <table>
        <tr><td><A HREF="#" onClick="testOpenPrimaryTab();return false"> With PrimaryTab</A>  </td></tr>
    </table>
</apex:page>


 
Rakesh KumarRakesh Kumar
I am also facing same issue. Can any one help us?