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
Pradeep RajuPradeep Raju 

sforce.console.getFocusedPrimaryTabId method in service cloud console

Can anyone help me on fetching the current opened primary tab id n service cloud console.I'm using like this & this will called on click of a button in window.open(.....)

<apex:includeScript value="/support/console/25.0/integration.js" />
    <script type="text/javascript">
        function buttonClick() {
            alert('Testing');
            alert(sforce.console.getFocusedPrimaryTabId(showTabId));
        }
        var showTabId = function showTabId(result) {
            alert('Tab IDs: ' + result.ids);
        };
    </script>
Shashank SrivatsavayaShashank Srivatsavaya
Hi Pradeep,

According to the example here: http://www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_getfocusedprimarytabid.htm

please try "result.id" instead of result.id

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
ShashForceShashForce
Hi Pradeep,

According to the example here: http://www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_getfocusedprimarytabid.htm

please try "result.id" instead of result.id

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
Pramodh KumarPramodh Kumar
I have same problem, could anyone please help with the getFocusedPrimaryTabId method. The result i am getting is scc-pt-0