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
1<apex:page>
2 <A HREF="#" onClick="testSetCallObjectIds();return false">
3 Click here to set call object Ids</A>
4
5 <apex:includeScript value="/support/console/48.0/integration.js"/>
6 <script type="text/javascript">
7
8 function checkResult(result) {
9 if (result.success) {
10 alert('Call object ids set successfully!');
11 } else {
12 alert('Call object ids cannot be set!');
13 }
14 }
15
16 function testSetCallObjectIds() {
17 sforce.console.cti.setCallObjectIds(['call.1', 'call.2', 'call.3'], checkResult);
18 }
19 </script>
20</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. |