Newer Version Available
describeAllTabs()
Returns information about all the tabs, including Lightning page tabs, available to
the logged-in user, regardless of whether the user has chosen to hide tabs in his own user
interface via the All Tabs (+) tab customization
feature.
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.