Skip to content

Instantly share code, notes, and snippets.

@marshallvaughn
Last active January 29, 2021 20:33
Show Gist options
  • Save marshallvaughn/19a1f46feb02b87a239e7fefd165544f to your computer and use it in GitHub Desktop.
Save marshallvaughn/19a1f46feb02b87a239e7fefd165544f to your computer and use it in GitHub Desktop.
sfdx Cookbook
# Get the name of each field on an object, by parsing its JSON description with jq
sfdx force:schema:sobject:describe --json -s account | jq -r '.result.fields[] | .name'
# Get the id of an object using the Tooling API
sfdx force:data:soql:query -q "SELECT Id FROM CustomObject WHERE DeveloperName = 'Account'" -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment