1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18 <apex:includeScript value="/support/console/31.0/integration.js"/>
19 <a href="#" onClick="testInitFileTransfer();return false;">Init file transfer</a>
20
21 <script type="text/javascript">
22 function testInitFileTransfer() {
23 //Gets the value for 'myChatKey'from the getChatRequests() or onChatRequested() methods.
24 //These values are for example purposes only.
25 var chatKey = 'myChatKey'; var entityId = 'myEntityId';
26 sforce.console.chat.initFileTransfer(chatKey, entityId, fileSuccess);
27 }
28
29 function fileSuccess(result) {
30 //Reports whether initiating the file transfer was successful.
31 if (result.success == true) {
32 alert('Initiating file transfer was successful.');
33 } else {
34 alert('Initiating file transfer was not successful.');
35 }
36 };
37 </script>
38</apex:page>