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 appears as a tab. When you add a custom tab to an app in Lightning Experience, it appears as an item in the app’s navigation bar and in the App Launcher. 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 Custom Tabs in Salesforce Help. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

The file suffix is .tab. There’s 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 The name of the Aura component to display in this tab.

Only one of these fields can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • page
  • scontrol
  • url
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 can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • 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 can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • 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 must 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 isn’t using one of the standard tab styles. This field is available in API version 14.0.
label string The label of the tab, for web tabs only.
lwcComponent string The name of the Lightning web component to display in this tab.

Only one of these fields can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • page
  • scontrol
  • url
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 can have a value set:

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

Only one of these fields can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • 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 can have a value set:

  • auraComponent
  • customObject
  • flexiPage
  • lwcComponent
  • page
  • scontrol
  • url
urlEncodingKey Encoding (enumeration of type string) The default encoding setting is Unicode: UTF-8. Change it if you’re 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:

<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <description>Myriad Publishing</description>
    <frameHeight>600</frameHeight>
    <motif>Custom53: Bell</motif>
    <url>https://www.example.com</url>
    <urlEncodingKey>UTF-8</urlEncodingKey>
</CustomTab>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.