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
sforce.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
<apex:page>
<apex:includeScript value="/support/console/64.0/integration.js"/>
<script type="text/javascript">
var MyCallback = function (result) {
alert('fireOnCallLogSaved was thrown: ' + result.success);
};
function testFireOnCallLogSaved() {
// Simulates that a call log was saved by passing the task object Id as input.
sforce.console.cti.fireOnCallLogSaved('00Txx000003qf8u', myCallback);
}
var callback = function (result) {
alert('Call Log was saved! Object Id saved is : ' + result.id);
};
sforce.console.cti.onCallLogSaved(callback);
</script>
<a href="#" onClick="testFireOnCallLogSaved();return false">
Test fireOnCallLogSaved API!</a>
</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. |