When to Use This Skill
Use this skill when you need to:
- Create tabs for objects, web pages, or Visualforce pages
- Add navigation tabs to applications
- Configure tab visibility and access
- Troubleshoot deployment errors related to custom tabs
Specification
CustomTab Metadata Specification
Overview
Custom tabs for navigating to objects, web content, or Visualforce pages within Salesforce applications.
Purpose
- Provide navigation to custom objects
- Link to external web content
- Access Visualforce pages
- Organize application navigation
Required Properties
Core Tab Properties
- customObject:
true for custom object tabs, false for all others.
- motif: Tab icon style — choose a motif that semantically matches the object's purpose. Do NOT reuse the same motif for every tab.
- label: Display name (required for non-object tabs ONLY; object tabs inherit label from the object)
- url: Web URL (for web tabs)
- page: Visualforce page name (for Visualforce tabs)
STRICT ELEMENT ALLOWLIST — READ THIS FIRST
The root element MUST always be <CustomTab> (NOT <Tab>). The XML namespace must be xmlns="http://soap.sforce.com/2006/04/metadata".
Only the elements listed below are valid. Any element not on this list WILL cause a deployment error.
| Tab Type |
ONLY these elements are allowed (nothing else) |
| Object tabs |
<customObject> (required, set to true), <motif> (required), <description> (optional) |
| Web tabs |
<customObject> (required, set to false), <label> (required), <motif> (required), <url> (required), <urlEncodingKey> (required, set to UTF-8), <description> (optional), <frameHeight> (optional) |
| Visualforce tabs |
<customObject> (required, set to false), <label> (required), <motif> (required), <page> (required), <description> (optional) |
FORBIDDEN ELEMENTS (every one of these causes a deployment error)
<sobjectName>, <name>, <fullName>, <apiVersion>, <isHidden>, <tabVisibility>, <type>, <mobileReady>, <urlFrameHeight>, <urlType>, <urlRedirect>, <encodingKey>, <height>, <auraComponent>
Also forbidden:
<label> on object tabs (object tabs inherit their label from the custom object)
<page> on web tabs (only for Visualforce tabs)
- Empty elements like
<page></page> or <description></description>
- Any element not in the allowlist table above
Tab Types
Object Tabs
- Purpose: Navigate to custom or standard objects
- File name determines the object:
{ObjectApiName}.tab-meta.xml (e.g., Space_Station__c.tab-meta.xml)
- Required elements:
<customObject>true</customObject> and <motif>
- Correct example (for a Space_Station__c.tab-meta.xml):
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom39: Telescope</motif>
</CustomTab>
- Correct example (for a Supply__c.tab-meta.xml — note different motif):
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom98: Truck</motif>
</CustomTab>
- WRONG — do NOT add
<sobjectName>, <name>, <fullName>, or <label>:
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<sobjectName>Space_Station__c</sobjectName> <!-- DEPLOYMENT ERROR -->
<label>Space Station</label> <!-- DEPLOYMENT ERROR on object tabs -->
<customObject>true</customObject>
<motif>Custom57: Desert</motif>
</CustomTab>
Web Tabs
- Purpose: Link to external websites or web applications
- File name: Use a descriptive name:
{TabName}.tab-meta.xml (e.g., Knowledge_Base.tab-meta.xml)
- COPY THIS EXACT TEMPLATE — only replace the placeholder values. Do NOT add, remove, or rename any XML elements:
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>false</customObject>
<description>REPLACE_WITH_DESCRIPTION</description>
<frameHeight>600</frameHeight>
<label>REPLACE_WITH_LABEL</label>
<motif>REPLACE_WITH_MOTIF</motif>
<url>REPLACE_WITH_URL</url>
<urlEncodingKey>UTF-8</urlEncodingKey>
</CustomTab>
- These 7 elements above are the ONLY elements allowed in a web tab file. Do not add ANY other elements.
- The
<description> element is optional — you may remove it if not needed, but do not add anything else.
Visualforce Tabs
- Purpose: Access custom Visualforce pages
- File name:
{TabName}.tab-meta.xml (e.g., Custom_Page_Tab.tab-meta.xml)
- Required elements:
<customObject>false</customObject>, <label>, <motif>, <page>
- Correct example:
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>false</customObject>
<label>Custom Page</label>
<motif>Custom46: Computer</motif>
<page>CustomPage</page>
</CustomTab>
Tab Configuration
Tab Style
- Default: Use standard tab styling
- Custom: Can specify custom tab styles if needed
Tab Visibility
- Default: Visible to all users with access
- Custom: Can be configured for specific user profiles
Supported Applications
- Standard Apps: Available in standard Salesforce applications
- Custom Apps: Can be included in custom applications
- Community Apps: Available in community applications
Integration Points
- Object Relationships: Links to related object records
- Web Content: External website integration
- Visualforce Pages: Custom page functionality
- Lightning Components: Modern component integration
Best Practices
- Use clear, descriptive tab labels
- Choose appropriate tab types for functionality
- Select a unique, contextually relevant motif for each tab — do not default every tab to the same icon
- Consider user experience and navigation flow
- Test tab functionality across different applications
- Ensure proper permissions and visibility settings
- Follow consistent naming conventions
- Object tab files MUST only contain
<customObject>true</customObject> and <motif> — nothing else
- Web tab files MUST only contain:
<customObject>false</customObject>, <label>, <motif>, <url>, <urlEncodingKey>, and optionally <description>, <frameHeight> — nothing else
- Never include
<isHidden>, <tabVisibility>, <type>, <mobileReady>, or empty elements
1---
2name: platform-custom-tab-generate
3description: "Use this skill when users need to create or configure Salesforce Custom Tabs. Trigger when users mention tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, or tab configuration. Also use when users want to add navigation to custom objects, create tabs for external content, or set up Lightning page tabs. Always use this skill for any custom tab work."
4metadata:
5 version: "1.0"
6 domains: ["Platform"]
7 minApiVersion: "60.0"
8---910
11## When to Use This Skill
12
13Use this skill when you need to:
14- Create tabs for objects, web pages, or Visualforce pages
15- Add navigation tabs to applications
16- Configure tab visibility and access
17- Troubleshoot deployment errors related to custom tabs
18
19## Specification
20
21# CustomTab Metadata Specification
22
23## Overview
24Custom tabs for navigating to objects, web content, or Visualforce pages within Salesforce applications.
25
26## Purpose
27- Provide navigation to custom objects
28- Link to external web content
29- Access Visualforce pages
30- Organize application navigation
31
32## Required Properties
33
34### Core Tab Properties
35- **customObject**: `true` for custom object tabs, `false` for all others.
36- **motif**: Tab icon style — choose a motif that semantically matches the object's purpose. Do NOT reuse the same motif for every tab.
37- **label**: Display name (required for non-object tabs ONLY; object tabs inherit label from the object)
38- **url**: Web URL (for web tabs)
39- **page**: Visualforce page name (for Visualforce tabs)
40
41
42### STRICT ELEMENT ALLOWLIST — READ THIS FIRST
43
44**The root element MUST always be `<CustomTab>` (NOT `<Tab>`).** The XML namespace must be `xmlns="http://soap.sforce.com/2006/04/metadata"`.
45
46Only the elements listed below are valid. **Any element not on this list WILL cause a deployment error.**
47
48| Tab Type | ONLY these elements are allowed (nothing else) |
49|---|---|
50| **Object tabs** | `<customObject>` (required, set to `true`), `<motif>` (required), `<description>` (optional) |
51| **Web tabs** | `<customObject>` (required, set to `false`), `<label>` (required), `<motif>` (required), `<url>` (required), `<urlEncodingKey>` (required, set to `UTF-8`), `<description>` (optional), `<frameHeight>` (optional) |
52| **Visualforce tabs** | `<customObject>` (required, set to `false`), `<label>` (required), `<motif>` (required), `<page>` (required), `<description>` (optional) |
53
54### FORBIDDEN ELEMENTS (every one of these causes a deployment error)
55`<sobjectName>`, `<name>`, `<fullName>`, `<apiVersion>`, `<isHidden>`, `<tabVisibility>`, `<type>`, `<mobileReady>`, `<urlFrameHeight>`, `<urlType>`, `<urlRedirect>`, `<encodingKey>`, `<height>`, `<auraComponent>`
56
57Also forbidden:
58- `<label>` on object tabs (object tabs inherit their label from the custom object)
59- `<page>` on web tabs (only for Visualforce tabs)
60- Empty elements like `<page></page>` or `<description></description>`
61- Any element not in the allowlist table above
62
63## Tab Types
64
65### Object Tabs
66- **Purpose**: Navigate to custom or standard objects
67- **File name** determines the object: `{ObjectApiName}.tab-meta.xml` (e.g., `Space_Station__c.tab-meta.xml`)
68- **Required elements**: `<customObject>true</customObject>` and `<motif>`
69- **Correct example** (for a Space_Station__c.tab-meta.xml):
70```xml
71<?xml version="1.0" encoding="UTF-8"?>
72<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
73 <customObject>true</customObject>
74 <motif>Custom39: Telescope</motif>
75</CustomTab>
76```
77- **Correct example** (for a Supply__c.tab-meta.xml — note different motif):
78```xml
79<?xml version="1.0" encoding="UTF-8"?>
80<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
81 <customObject>true</customObject>
82 <motif>Custom98: Truck</motif>
83</CustomTab>
84```
85- **WRONG** — do NOT add `<sobjectName>`, `<name>`, `<fullName>`, or `<label>`:
86```xml
87<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
88 <sobjectName>Space_Station__c</sobjectName> <!-- DEPLOYMENT ERROR -->
89 <label>Space Station</label> <!-- DEPLOYMENT ERROR on object tabs -->
90 <customObject>true</customObject>
91 <motif>Custom57: Desert</motif>
92</CustomTab>
93```
94
95### Web Tabs
96- **Purpose**: Link to external websites or web applications
97- **File name**: Use a descriptive name: `{TabName}.tab-meta.xml` (e.g., `Knowledge_Base.tab-meta.xml`)
98- **COPY THIS EXACT TEMPLATE** — only replace the placeholder values. Do NOT add, remove, or rename any XML elements:
99```xml
100<?xml version="1.0" encoding="UTF-8"?>
101<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
102 <customObject>false</customObject>
103 <description>REPLACE_WITH_DESCRIPTION</description>
104 <frameHeight>600</frameHeight>
105 <label>REPLACE_WITH_LABEL</label>
106 <motif>REPLACE_WITH_MOTIF</motif>
107 <url>REPLACE_WITH_URL</url>
108 <urlEncodingKey>UTF-8</urlEncodingKey>
109</CustomTab>
110```
111- **These 7 elements above are the ONLY elements allowed in a web tab file.** Do not add ANY other elements.
112- The `<description>` element is optional — you may remove it if not needed, but do not add anything else.
113
114### Visualforce Tabs
115- **Purpose**: Access custom Visualforce pages
116- **File name**: `{TabName}.tab-meta.xml` (e.g., `Custom_Page_Tab.tab-meta.xml`)
117- **Required elements**: `<customObject>false</customObject>`, `<label>`, `<motif>`, `<page>`
118- **Correct example**:
119```xml
120<?xml version="1.0" encoding="UTF-8"?>
121<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
122 <customObject>false</customObject>
123 <label>Custom Page</label>
124 <motif>Custom46: Computer</motif>
125 <page>CustomPage</page>
126</CustomTab>
127```
128
129## Tab Configuration
130
131### Tab Style
132- **Default**: Use standard tab styling
133- **Custom**: Can specify custom tab styles if needed
134
135### Tab Visibility
136- **Default**: Visible to all users with access
137- **Custom**: Can be configured for specific user profiles
138
139## Supported Applications
140- **Standard Apps**: Available in standard Salesforce applications
141- **Custom Apps**: Can be included in custom applications
142- **Community Apps**: Available in community applications
143
144## Integration Points
145- **Object Relationships**: Links to related object records
146- **Web Content**: External website integration
147- **Visualforce Pages**: Custom page functionality
148- **Lightning Components**: Modern component integration
149## Best Practices
150- Use clear, descriptive tab labels
151- Choose appropriate tab types for functionality
152- **Select a unique, contextually relevant motif for each tab** — do not default every tab to the same icon
153- Consider user experience and navigation flow
154- Test tab functionality across different applications
155- Ensure proper permissions and visibility settings
156- Follow consistent naming conventions
157- Object tab files MUST only contain `<customObject>true</customObject>` and `<motif>` — nothing else
158- Web tab files MUST only contain: `<customObject>false</customObject>`, `<label>`, `<motif>`, `<url>`, `<urlEncodingKey>`, and optionally `<description>`, `<frameHeight>` — nothing else
159- Never include `<isHidden>`, `<tabVisibility>`, `<type>`, `<mobileReady>`, or empty elements