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.
describeAllTabs()
Syntax
1DescribeTab [] = connection.describeAllTabs();Usage
Use the describeAllTabs() call to obtain information about all the tabs that are available to the logged-in user.
Alternately, use describeTabs() if you want information only about the tabs that display in the Salesforce user interface for the logged-in user.
Sample Code—Java
This sample calls describeAllTabs(), which returns an array of DescribeTab results.
1public void describeAllTabsSample() {
2 try {
3 // Describe tabs
4 DescribeTab[] tabs = connection.describeAllTabs();
5 System.out.println("There are " + tabs.length +
6 " tabs available to you.");
7
8 // Iterate through the returned tabs
9 for (int j = 0; j < tabs.length; j++) {
10 DescribeTab tab = tabs[j];
11 System.out.println("\tTab " + (j + 1) + ":");
12 System.out.println("\t\tName: " + tab.getName());
13 System.out.println("\t\t\Associated SObject" + tab.getSobjectName());
14 System.out.println("\t\tLabel: " + tab.getLabel());
15 System.out.println("\t\tURL: " + tab.getUrl());
16 DescribeColor[] tabColors = tab.getColors();
17 // Iterate through tab colors as needed
18 DescribeIcon[] tabIcons = tab.getIcons();
19 // Iterate through tab icons as needed
20 }
21 } catch (ConnectionException ce) {
22 ce.printStackTrace();
23 }
24}Arguments
None.