The describeTabs call returns information about the standard and custom apps available to the logged-in user. An app is a group of tabs that works as a unit to provide application functionality. For example, two of the standard Salesforce apps are "Sales" and "Service and Support."
DescribeTabSetResult [] = sfdc.describeTabs();
Use the describeTabs() call to obtain information about the standard and custom apps to which the logged-in user has access. The describeTabs call returns the minimum required metadata that can be used to render apps in another user interface. Typically this call is used by partner applications to render Salesforce data in another user interface.
In the Salesforce user interface, users have access to standard apps (and may also have access to custom apps) as listed in the Force.com app menu at the top of the page. Selecting an app name in the menu allows the user to switch between the listed apps at any time.
For each app, the call returns the app name, the URL of the logo, whether or not it is the currently selected application for the user, and details about the tabs included in that app.
For each tab, the call returns the tab name, the primary sObject that is displayed on the tab, whether it is a custom tab, and the URL for viewing that tab. Note that the “All Tabs” tab is never included in the list of tabs.
private void describeTabSet ()
{
try {
DescribeTabSetResult[] dtsrs = binding.describeTabs();
System.out.println("There are " + new Integer(dtsrs.length).toString() +
" tabsets defined.");
for (int i=0;i<dtsrs.length;i++) {
System.out.println("Tabset " + new Integer(i + 1).toString() + ":");
DescribeTabSetResult dtsr = dtsrs[i];
String tabSetLabel = dtsr.getLabel();
String logoUrl = dtsr.getLogoUrl();
boolean isSelected = dtsr.isSelected();
DescribeTab[] tabs = dtsr.getTabs();
System.out.println("Label is " + tabSetLabel + " logo url is " + logoUrl + ",
there are " + new Integer(tabs.length) + " tabs defined in this set.
This tab is selected: " + isSelected);
for (int j=0;j<tabs.length;j++) {
DescribeTab tab = tabs[j];
String tabLabel = tab.getLabel();
String objectName = tab.getSobjectName();
String tabUrl = tab.getUrl();
System.out.println("\tTab " + new Integer(j + 1) + ": \n\t\tLabel = " +
tabLabel + "\n\t\tObject details on tab: " + objectName + "\n\t\t" +
"Url to tab: " + tabUrl);
}
}
} catch (Exception ex) {
System.out.println("\nFailed to describe tabs, error message was: \n" +
ex.getMessage());
}
}
sforce.DescribeTabSetResult[] dtsrs = binding.describeTabs();
Console.WriteLine("There are " + dtsrs.Length.ToString() + " tabsets defined.");
for (int i=0;i<dtsrs.Length;i++)
{
Console.WriteLine("Tabset " + (i + 1).ToString() + ":");
sforce.DescribeTabSetResult dtsr = dtsrs[i];
String tabSetLabel = dtsr.label;
String logoUrl = dtsr.logoUrl;
bool isSelected = dtsr.selected;
DescribeTab[] tabs = dtsr.tabs;
Console.WriteLine("Label is " + tabSetLabel + " logo url is " + logoUrl + ",
there are " + tabs.Length.ToString() + " tabs defined in this set.");
for (int j=0;j<tabs.Length;j++)
{
sforce.DescribeTab tab = tabs[j];
String tabLabel = tab.label;
String objectName = tab.sobjectName;
String tabUrl = tab.url;
Console.WriteLine("\tTab " + (j + 1).ToString() + ": \n\t\tLabel = " +
tabLabel + "\n\t\tObject details on tab: " + objectName +
"\n\t\t" + "Url to tab: " + tabUrl);
}
}