Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

isCustomConsoleComponentHidden()

Determines if the application-level custom console component window is hidden. This method is available in API version 32.0 and later. In API version 31.0 and earlier, this method was called isCustomConsoleComponentWindowHidden().

Syntax

1sforce.console.isCustomConsoleComponentHidden((optional) callback:Function)

Arguments

Name Type Description
callback function JavaScript method called upon completion of the method.

Sample Code–Visualforce

1<apex:page>
2
3     <A HREF="#" onClick="testIsCustomConsoleComponentHidden();return false">
4         Click here to check if the custom console component window is hidden</A> 
5
6    <apex:includeScript value="/support/console/68.0/integration.js"/>
7    <script type="text/javascript">
8        function testIsCustomConsoleComponentHidden() {
9            sforce.console.isCustomConsoleComponentHidden(checkWindowVisibility);
10        }
11        
12        var checkWindowVisibility = function checkWindowVisibility(result) {
13            //Display the window visibility
14            if (result.success) {
15              alert('Is window hidden: ' + result.hidden);
16            } else {
17              alert('Error!');
18            }
19        }
20  </script>
21
22</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
hidden boolean true if the custom console component window is hidden; false if the custom console component window is visible.
success boolean true if the isCustomConsoleComponentHidden() call was successful; false if the isCustomConsoleComponentHidden() call wasn’t successful.