Newer Version Available

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

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.

1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17public void describeAllTabsSample() {
18  try {
19    // Describe tabs
20    DescribeTab[] tabs = connection.describeAllTabs();
21    System.out.println("There are " + tabs.length + 
22        " tabs available to you.");
23
24      // Iterate through the returned tabs
25      for (int j = 0; j < tabs.length; j++) {
26        DescribeTab tab = tabs[j];
27        System.out.println("\tTab " + (j + 1) + ":");
28        System.out.println("\t\tName: " + tab.getName());
29        System.out.println("\t\t\Associated SObject" + tab.getSobjectName());
30        System.out.println("\t\tLabel: " + tab.getLabel());
31        System.out.println("\t\tURL: " + tab.getUrl());
32        DescribeColor[] tabColors = tab.getColors();
33        // Iterate through tab colors as needed
34        DescribeIcon[] tabIcons = tab.getIcons();
35        // Iterate through tab icons as needed
36      }
37  } catch (ConnectionException ce) {
38    ce.printStackTrace();
39  }
40}

Arguments

None.

Response

DescribeTab