schema generate tab

Generate the metadata source files for a new custom tab on a custom object.

Custom tabs let you display custom object data or other web content in Salesforce. Custom tabs appear in Salesforce as an item in the app’s navigation bar and in the App Launcher.

This command must be run in a Salesforce DX project directory. You must pass all required information to it with the required flags. The source files for the custom object for which you’re generating a tab don’t need to exist in your local project.

generate:metadata:tab

Flag Name (Long)Flag Name (Short)Description
‑‑directory‑dType: Value
Required

Path to a “tabs” directory that will contain the source files for your new tab.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑icon‑iType: Value
Required
Default value: 1

Number from 1 to 100 that specifies the color scheme and icon for the custom tab.

See https://lightningdesignsystem.com/icons/#custom for the available icons.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑object‑oType: Value
Required

API name of the custom object you’re generating a tab for.

The API name for a custom object always ends in __c, such as MyObject__c.

Create a tab on the MyObject__c custom object: