Newer Version Available

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

describeTabs()

Returns information about the Salesforce Classic standard and custom apps available to the logged-in user, as listed in the Lightning Platform app menu at the top of the page. An app is a set of tabs that works as a unit to provide application functionality. For example, two of the standard Salesforce apps are “Sales” and “Service.”

Syntax

Usage

Use the describeTabs() call to obtain information about the Salesforce Classic 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.

For each app, the call returns the app name, the URL of the logo, whether it’s the currently selected application for the user, and details about the tabs included in that app.

The describeTabs() call returns information only about tabs that display in the Salesforce user interface for the logged-in user. If a user clicks the All Tabs (+) tab and hides some tabs from his Salesforce user interface, those user-hidden tabs aren’t included in the set of tabs returned by describeTabs().

Use the describeAllTabs() call to obtain information about all the tabs that are available to the logged-in user.

Important

For each tab, the call returns the tab name, the primary sObject that’s displayed on the tab, whether it’s a custom tab, and the URL for viewing that tab. Note that the “All Tabs” tab and Lightning page tabs aren’t included in the list of tabs.

Sample Code—Java

This sample calls describeTabs(), which returns an array of tab set results. Next, for each tab set result, which represents a Salesforce Classic app, it retrieves some of its properties and gets all the tabs for this app. It writes all retrieved properties to the console.

Sample Code—C#

This sample calls describeTabs(), which returns an array of tab set results. Next, for each tab set result, which represents a Salesforce Classic app, it retrieves some of its properties and gets all the tabs for this app. It writes all retrieved properties to the console.

Arguments

None.