
Generating Custom Tab
Generate and configure Salesforce Custom Tab metadata for objects, web pages, Visualforce, Lightning components, and app pages.
Install
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-custom-tabWhat is this skill?
- Covers object tabs, web tabs, Visualforce tabs, Lightning component tabs, and app page tabs
- Documents CustomTab metadata: customObject flag, motif, label, url, and page bindings
- Guides tab visibility, access, and application navigation setup
- Includes troubleshooting guidance for custom tab deployment errors
Adoption & trust: 731 installs on skills.sh; 513 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Azure Deploymicrosoft/azure-skills
Azure Preparemicrosoft/azure-skills
Azure Storagemicrosoft/azure-skills
Azure Validatemicrosoft/azure-skills
Appinsights Instrumentationmicrosoft/azure-skills
Azure Resource Lookupmicrosoft/azure-skills
Journey fit
Primary fit
Custom tabs are platform navigation and metadata work done while building on Salesforce, not launch or growth marketing tasks. Tabs wire CRM objects, external URLs, and Lightning pages into apps—classic integration and app-shell configuration on a managed cloud org.
Common Questions / FAQ
Is Generating Custom Tab safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Generating Custom Tab
## 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 <?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 <?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>`: ```xml <CustomTab xmlns="http://soap.sforce.com/2006/04/metadata"> <sobjectName>Space_Station__c</sobjectName> <!-- DEPLOYMENT ERROR --> <label>