No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
DescribeTabSetResult Class
Namespace
Usage
The Schema.describeTabs method returns a list of Schema.DescribeTabSetResult objects that describe standard and custom apps.
The methods in the Schema.DescribeTabSetResult class can be called using their property counterparts. For each method starting with get, you can omit the get prefix and the ending parentheses () to call the property counterpart. For example, tabSetResultObj.label is equivalent to tabSetResultObj.getLabel(). Similarly, for each method starting with is, omit the is prefix and the ending parentheses (). For example, tabSetResultObj.isSelected is equivalent to tabSetResultObj.selected.
Example
This example shows how to call the Schema.describeTabs method to get describe information for all available apps. This example iterates through each describe result and gets more metadata information for the Sales app.
1swfobject.registerObject("clippy.codeblock-0", "9");// App we're interested to get more info about
2String appName = 'Sales';
3
4// Get tab set describes for each app
5List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs();
6
7// Iterate through each tab set describe for each app and display the info
8for(Schema.DescribeTabSetResult tsr : tabSetDesc) {
9 // Get more information for the Sales app
10 if (tsr.getLabel() == appName) {
11 // Find out if the app is selected
12 if (tsr.isSelected()) {
13 System.debug('The ' + appName + ' app is selected. ');
14 }
15 // Get the app's Logo URL and namespace
16 String logo = tsr.getLogoUrl();
17 System.debug('Logo URL: ' + logo);
18 String ns = tsr.getNamespace();
19 if (ns == '') {
20 System.debug('The ' + appName + ' app has no namespace defined.');
21 }
22 else {
23 System.debug('Namespace: ' + ns);
24 }
25 // Get the number of tabs
26 System.debug('The ' + appName + ' app has ' + tsr.getTabs().size() + ' tabs.');
27 }
28}
29
30// Example debug statement output
31// DEBUG|The Sales app is selected.
32// DEBUG|Logo URL: https://na1.salesforce.com/img/seasonLogos/2014_winter_aloha.png
33// DEBUG|The Sales app has no namespace defined.
34// DEBUG|The Sales app has 14 tabs.DescribeTabSetResult Methods
The following are methods for DescribeTabSetResult. All are instance methods.
getLabel()
Signature
public String getLabel()
Return Value
Type: String
Usage
The display label changes when tabs are renamed in the Salesforce user interface. See the Salesforce online help for more information.
getLogoUrl()
Signature
public String getLogoUrl()
Return Value
Type: String
getNamespace()
Signature
public String getNamespace()
Return Value
Type: String
Usage
This namespace prefix corresponds to the namespace prefix of the Developer Edition organization that was enabled to allow publishing a managed package. This method applies to a custom app containing a set of tabs and installed as part of a managed package.
getTabs()
Signature
public List<Schema.DescribeTabResult> getTabs()
Return Value
Type: List<Schema.DescribeTabResult>
isSelected()
Signature
public Boolean isSelected()
Return Value
Type: Boolean