schema Commands
Use the schema commands to view and edit the metadata for the standard and custom objects in your org.
schema:sobject:describe
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 Account1$ sfdx force:schema:sobject:describe -s MyObject__cschema:sobject:list
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 all1$ sfdx force:schema:sobject:list -c custom1$ sfdx force:schema:sobject:list -c standard