Newer Version Available
setCustomConsoleComponentPopoutable()
Sets a custom console component to be
popped out or popped into a browser. To use this method,
multi-monitor components must be turned on. For more information, see “Turn on Multi-Monitor Components for a Salesforce Console” in the online help. This method is only available in API version 30.0 or
later.
Syntax
1sforce.console.setCustomConsoleComponentPopoutable(popoutable:Boolean, (optional)callback:Function)Arguments
| Name | Type | Description |
|---|---|---|
| popoutable | boolean | If true, the component can be popped out or popped into a browser. If false, the component cannot be popped out or popped into a browser. |
| callback | function | JavaScript method that’s called upon completion of the method. |
Sample Code–Visualforce
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
19 <A HREF="#" onClick="enablePopout(); return false;">
20 Click here to enable pop out or pop in functionality</A> <BR/>
21 <A HREF="#" onClick="disablePopout(); return false;">
22 Click here to disable pop out or pop in functionality</A>
23
24 <apex:includeScript value="/support/console/30.0/integration.js"/>
25 <script type="text/javascript">
26 function checkResult(result) {
27 if (result.success) {
28 alert('The method was successfully invoked.');
29 } else {
30 alert('Error while invoking this method. Check the browser developer console for more information.');
31 }
32 }
33
34 function enablePopout() {
35 sforce.console.setCustomConsoleComponentPopoutable(true, checkResult);
36 }
37
38 function disablePopout() {
39 sforce.console.setCustomConsoleComponentPopoutable(false, checkResult);
40 }
41 </script>
42</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 enabling pop out or pop in functionality for the component was successful; false otherwise. |