1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18
19 <A HREF="#" onClick="testGetFocusedPrimaryTabObjectId();return false">
20 Click here to get the focused primary tab object ID</A>
21
22 <apex:includeScript value="/support/console/25.0/integration.js"/>
23 <script type="text/javascript">
24 function testGetFocusedPrimaryTabObjectId() {
25 sforce.console.getFocusedPrimaryTabObjectId(showObjectId);
26 }
27 var showObjectId = function showObjectId(result) {
28 //Display the object ID
29 alert('Object ID: ' + result.id);
30 };
31
32 </script>
33
34</apex:page>