schema Commands

Use the schema commands to view and edit the metadata for the standard and custom objects in your org.

schema:sobject:describe

Displays the metadata for a standard or custom object.

Command Syntax

sfdx force:schema:sobject:describe
[-s SOBJECTTYPE]
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-s | --sobjecttype SOBJECTTYPE
Optional




The API name of the object to describe.

Type: string
-u | --targetusername TARGETUSERNAME
Optional




Username for the target org. Overrides the default target org.

Type: string
--json
Optional




Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional




The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for schema:sobject:describe

Examples:

1$ sfdx force:schema:sobject:describe -s Account
1$ sfdx force:schema:sobject:describe -s MyObject__c

schema:sobject:list

Lists all objects, custom objects, or standard objects in the org.

Command Syntax

sfdx force:schema:sobject:list
-c SOBJECTTYPECATEGORY
[-u TARGETUSERNAME]
[--json]
[--loglevel LOGLEVEL]

Parameters

-c | --sobjecttypecategory SOBJECTTYPECATEGORY
Required




The type of objects to list: all, custom, or standard.

Type: string
-u | --targetusername TARGETUSERNAME
Optional




Username for the target org. Overrides the default target org.

Type: string
--json
Optional




Format output as JSON.

Type: flag
--loglevel LOGLEVEL
Optional




The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.

Type: string
Permissible values are: trace, debug, info, warn, error, fatal
Default value: error

Help for schema:sobject:list

Examples:

1$ sfdx force:schema:sobject:list -c all
1$ sfdx force:schema:sobject:list -c custom
1$ sfdx force:schema:sobject:list -c standard