Newer Version Available
setCallObjectIds()
Sets call object IDs, in ascending order of arrival.
This method is only available in API version 31.0 or
later.
Syntax
1sforce.console.cti.setCallObjectIds( callObjectIds:Array, callback:Function )Arguments
| Name | Type | Description |
|---|---|---|
| callObjectId | array | An array of string IDs specifying the calls to set. |
| 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 <A HREF="#" onClick="testSetCallObjectIds();return false">
19 Click here to set call object Ids</A>
20
21 <apex:includeScript value="/support/console/31.0/integration.js"/>
22 <script type="text/javascript">
23
24 function checkResult(result) {
25 if (result.success) {
26 alert('Call object ids set successfully!');
27 } else {
28 alert('Call object ids cannot be set!');
29 }
30 }
31
32 function testSetCallObjectIds() {
33 sforce.console.cti.setCallObjectIds(['call.1', 'call.2', 'call.3'], checkResult);
34 }
35 </script>
36</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 field:
| Name | Type | Description |
|---|---|---|
| success | boolean | true if setting the call IDs was successful; false otherwise. |