Newer Version Available

This content describes an older version of this product. View Latest

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 Salesforce Classic” 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

1<apex:page>
2
3    <A HREF="#" onClick="enablePopout(); return false;">
4         Click here to enable pop out or pop in functionality</A> <BR/> 
5    <A HREF="#" onClick="disablePopout(); return false;">
6         Click here to disable pop out or pop in functionality</A> 
7
8    <apex:includeScript value="/support/console/55.0/integration.js"/>
9    <script type="text/javascript">
10        function checkResult(result) {
11          if (result.success) { 
12            alert('The method was successfully invoked.');
13          } else {
14            alert('Error while invoking this method. Check the browser developer console for more information.');
15          }
16        }
17
18        function enablePopout() {
19          sforce.console.setCustomConsoleComponentPopoutable(true, checkResult);
20        }
21
22        function disablePopout() {
23          sforce.console.setCustomConsoleComponentPopoutable(false, checkResult);
24        }
25    </script>
26</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.