No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
getCallAttachedData()
Usage
Returns the attached data of a call represented by the call object ID or null if there isn’t an active call. The data is returned in JSON format. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later.
Syntax
1sforce.console.cti.getCallAttachedData( callObjectId, (optional) callback:Function )Arguments
| Name | Type | Description |
|---|---|---|
| callObjectId | string | The call object ID of the call that retrieves the attached data. |
| callback | function | JavaScript method called upon completion of the method. |
Sample Code–Visualforce
1swfobject.registerObject("clippy.codeblock-1", "9");<apex:page>
2 <apex:includeScript value="/support/console/24.0/integration.js"/>
3 <script type="text/javascript">
4
5 var callback2 = function (result) {
6 alert('Call attached data is ' + result.data);
7 };
8
9 /* Retrieving call ID of first call that came in and
10 * calling getCallAttachedData() to retrieve call data.
11 */
12 var callback1 = function (result) {
13 if (result.ids && result.ids.length > 0) {
14 sforce.console.cti.getCallAttachedData(result.ids[0], callback2);
15 }
16 }
17};
18
19 //Note that we are using the CTI submodule here
20 sforce.console.cti.getCallObjectIds(callback1);
21 </script>
22</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 |
|---|---|---|
| data | string | The attached data of a call in JSON format. |
| success | boolean | true if returning the attached data was successful; false if returning the attached data wasn’t successful. |
| type | string | The type of call. Possible values are 'INTERNAL', 'INBOUND', and 'OUTBOUND'. |