onCallEnd()
構文
1sforce.console.cti.onCallEnd( eventHandler:Function )引数
| 名前 | 型 | 説明 |
|---|---|---|
| eventHandler | function | 通話が終了するとコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1<apex:page>
2 <apex:includeScript value="/support/console/60.0/integration.js"/>
3 <script type="text/javascript">
4
5 var callback = function (result) {
6 var str = 'Call ' + result.id + ' ended! ';
7 str += 'Call duration is ' + result.duration + '. ';
8 str += 'Call disposition is ' + result.disposition;
9 alert(str);
10 };
11
12 //Note that we are using the CTI submodule here
13 sforce.console.cti.onCallEnd(callback);
14 </script>
15</apex:page>応答
このメソッドは非同期であるため、コールバックメソッドのオブジェクトで応答を返します。応答オブジェクトには次の項目が含まれます。
| 名前 | 型 | 説明 |
|---|---|---|
| id | string | 終了した通話の通話オブジェクト ID。 |
| duration | string | 通話の所要時間。 |
| disposition | string | 通話の配置。 |