describeAllTabs()
ユーザが [すべてのタブ] ([+]) タブカスタマイズ機能を使用して自分のユーザインターフェースでタブを非表示にしているかどうかに関係なく、ログインユーザが使用できるすべてのタブ (Lightning ページタブを含む) に関する情報を返します。
構文
1DescribeTab [] = connection.describeAllTabs();使用方法
ログインユーザが使用できるすべてのタブに関する情報を取得するのに、describeAllTabs() コールを使用します。
または、ログインユーザの Salesforce ユーザインターフェースに表示されるタブに関する情報のみが必要な場合は、describeTabs() を使用します。
サンプルコード —Java
このサンプルでは、describeAllTabs() をコールします。これは、DescribeTab の結果の配列を返します。
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}引数
なし。