Newer Version Available

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

CustomTab

Represents a custom tab. Custom tabs let you display custom object data or other web content in Salesforce. When you add a custom tab to an app in Salesforce Classic, it displays as a tab. When you add a custom tab to an app in Lightning Experience, it displays as an item in the app’s navigation bar. When a tab displays a custom object, the tab name is the same as the custom object name; for page, s-control, or URL tabs, the name is arbitrary. For more information, see “Show Custom Object Data for Your Users” in the Salesforce online help. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

The file suffix is .tab. There is one file for each tab, stored in the tabs folder in the corresponding package directory.

Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.

Note

Version

Tabs are available in API version 10.0 and later.

Fields

This metadata type contains the following fields:

Field Name Field Type Description
actionOverrides ActionOverride[] A list of the action overrides that are assigned to the tab. Only one override is allowed per formFactor for a given tab.

This field is available in API version 37.0 and later.

auraComponent string Indicates whether this tab is for a Lightning component (true) or not (false). If set to true, the name of the tab matches the name of the Lightning component.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url

auraComponent is part of the Lightning Components (Beta) feature.

Note

customObject boolean Indicates whether this tab is for a custom object (true) or not (false). If set to true, the name of the tab matches the name of the custom object.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url
description string The optional description text for the tab.
flexiPage string The name of the Lightning Page to display in this tab.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url
frameHeight int The height, in pixels of the tab frame. Required for s-control and page tabs.
fullName string The name of the tab. The value of this field depends on the type of tab, and the API version.
  • For custom object tabs, the fullName is the developer-assigned name of the custom object (MyCustomObject__c, for example). For custom object tabs, this name must be the same as the custom object name, and customObject should be set to true.
  • For Web tabs, the fullName is the developer-assigned name of the tab (MyWebTab, for example).

The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the Metadata component.

hasSidebar boolean Indicates if the tab displays the sidebar panel.
icon string The optional reference to the image document for the tab if the tab is not using one of the standard tab styles. This is a new field in API version 14.0.
label string This is the label of the tab, for Web tabs only.
mobileReady boolean Required. Indicates if the custom tab is available for Mobile Edition (true) or not (false).
motif string Required. The tab style for the color scheme and icon for the custom tab. For example, “'Custom70: Handsaw,” is the handsaw icon.
page string The name of the Visualforce page to display in this tab.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url
scontrol string The name of the s-control to display in this tab.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url
splashPageLink string The custom link used as the introductory splash page when users click the tab. References a HomePageComponent.
url string The URL for the external web-page to embed in this tab.

Only one of these fields should have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • page
  • scontrol
  • url
urlEncodingKey Encoding (enumeration of type string) The default encoding setting is Unicode: UTF-8. Change it if you are passing information to a URL that requires data in a different format. This option is available when the value URL is selected in the tab type.

Declarative Metadata Sample Definition

The following is the definition of a tab:

1<?xml version="1.0" encoding="UTF-8"?>
2<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
3    <description>Myriad Publishing</description>
4    <frameHeight>600</frameHeight>
5    <mobileReady>true</mobileReady>
6    <motif>Custom53: Bell</motif>
7    <url>http://www.myriadpubs.com</url>
8    <urlEncodingKey>UTF-8</urlEncodingKey>
9</CustomTab>