Newer Version Available
getCallObjectIds()
Returns any active call object IDs in the order in
which they arrived or null if there aren’t any active calls. This method is for computer-telephony integration (CTI);
it’s only available in API version 24.0 or later.
Syntax
1sforce.console.cti.getCallObjectIds( (optional) callback:Function )Arguments
| Name | Type | Description |
|---|---|---|
| callback | function | JavaScript method called upon completion of the method. |
Sample Code–Visualforce
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 <apex:includeScript value="/support/console/24.0/integration.js"/>
19 <script type="text/javascript">
20
21 var callback = function (result) {
22 alert('Active call object ids: ' + result.ids);
23 };
24
25 //Note that we are using the CTI submodule here
26 sforce.console.cti.getCallObjectIds(callback);
27 </script>
28</apex:page>Response
This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields:
| Name | Type | Description |
|---|---|---|
| ids | string | The call object IDs of active calls or null if no call is active. |
| success | boolean | true if returning the active call object IDs was successful; false if returning the active call object IDs wasn’t successful. |