No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
initFileTransfer()
構文
1sforce.console.chat.initFileTransfer(chatKey:String, entityId:String, (optional)callback:Function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| chatKey | String | ファイルの転送元のチャットのチャットキー。 |
| entityId | String | 転送されたファイルが添付されるトランスクリプトオブジェクトの ID。 |
| callback | function | メソッドの完了時にコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1swfobject.registerObject("clippy.codeblock-1", "9");<apex:page>
2 <apex:includeScript value="/support/console/31.0/integration.js"/>
3 <a href="#" onClick="testInitFileTransfer();return false;">Init file transfer</a>
4
5 <script type="text/javascript">
6 function testInitFileTransfer() {
7 //Gets the value for 'myChatKey'from the getChatRequests() or onChatRequested() methods.
8 //These values are for example purposes only.
9 var chatKey = 'myChatKey'; var entityId = 'myEntityId';
10 sforce.console.chat.initFileTransfer(chatKey, entityId, fileSuccess);
11 }
12
13 function fileSuccess(result) {
14 //Reports whether initiating the file transfer was successful.
15 if (result.success == true) {
16 alert('Initiating file transfer was successful.');
17 } else {
18 alert('Initiating file transfer was not successful.');
19 }
20 };
21 </script>
22</apex:page>