Newer Version Available
fireOnCallLogSaved()
Calls the eventHandler function
registered with onCallLogSaved(). Use to get information or send information between an interaction
log and a custom console component.. This method is only available in API version 31.0 or
later.
Syntax
1sforce.console.cti.fireOnCallLogSaved( id:String, (optional)callback:Function )Arguments
| Name | Type | Description |
|---|---|---|
| id | string | The object ID of the saved call log. |
| callback | function | JavaScript method called upon completion of the method. |
Sample Code–Visualforce
1<apex:page>
2 <apex:includeScript value="/support/console/56.0/integration.js"/>
3 <script type="text/javascript">
4
5 var MyCallback = function (result) {
6 alert('fireOnCallLogSaved was thrown: ' + result.success);
7 };
8
9 function testFireOnCallLogSaved() {
10 // Simulates that a call log was saved by passing the task object Id as input.
11 sforce.console.cti.fireOnCallLogSaved('00Txx000003qf8u', myCallback);
12 }
13
14 var callback = function (result) {
15 alert('Call Log was saved! Object Id saved is : ' + result.id);
16 };
17
18 sforce.console.cti.onCallLogSaved(callback);
19 </script>
20 <a href="#" onClick="testFireOnCallLogSaved();return false">
21 Test fireOnCallLogSaved API!</a>
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 field:
| Name | Type | Description |
|---|---|---|
| success | boolean | true if firing the event is successful, false otherwise. |