List all Salesforce objects of a specified category.
Description for sobject list
You can list the standard objects, custom objects, or all. The lists include only Salesforce objects, not Tooling API objects.
Aliases for sobject list
force:schema:sobject:list
Flags
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
| <code>‑‑api‑version</code> | N/A | Type: Value<br><br>Override the api version used for api requests made by this command |
| <code>‑‑flags‑dir</code> | N/A | Type: Value<br><br>Import flag values from a directory. |
| <code>‑‑json</code> | N/A | Type: Boolean<br><br>Format output as json. |
| <code>‑‑sobject</code> | <code>‑s</code> | Type: Value<br>Default value: ALL<br><br>Category of objects to list. |
| <code>‑‑target‑org</code> | <code>‑o</code> | Type: Value<br>Required<br><br>Username or alias of the target org. Not required if the target-org configuration variable is already set. |
Examples for sobject list
List all objects in your default org:
sf sobject list --sobject all
List only custom objects in the org with alias "my-scratch-org":
sf sobject list --sobject custom --target-org my-scratch-org
<!-- prettier-ignore-end -->