Get Complete List Of Objects Using SF CLI Command๐๐๐

ย
Suppose you need to get the list of all objects on your org or a list of Custom objects or Standard objects separately๐๐๐.
What is the approach you will go forโ
wait a minute to think!
๐๐๐
ย
The easiest way would be using '๐ด๐ง ๐ด๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ญ๐ช๐ด๐ต'
command in SF CLI!๐ฟ๐
- ๐use flag
'--๐ด๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต'
to get all|custom|standard objects Eg:
๐ด๐ง ๐ด๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ญ๐ช๐ด๐ต --๐ด๐ถ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ค๐ถ๐ด๐ต๐ฐ๐ฎ
-
๐use
'-๐ฐ'
or'--๐ต๐ข๐ณ๐จ๐ฆ๐ต-๐ฐ๐ณ๐จ'
optionally. This will be needed if you run the command out of sfdx project structure or no default org is selected or you want list from a non defaulted org -
๐going a step forward, if you need to get this in a csv file, add
> <filename>.csv
in the command๐ฎ๐ช
For Eg:
๐ด๐ง ๐ด๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ญ๐ช๐ด๐ต --๐ด๐ถ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ค๐ถ๐ด๐ต๐ฐ๐ฎ > ๐ค๐ถ๐ด๐ต๐ฐ๐ฎ๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต๐ด.๐ค๐ด๐ท
or
๐ด๐ง ๐ด๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ญ๐ช๐ด๐ต --๐ด๐ถ๐ฃ๐ซ๐ฆ๐ค๐ต ๐ด๐ต๐ข๐ฏ๐ฅ๐ข๐ณ๐ฅ > ๐ด๐ต๐ข๐ฏ๐ฅ๐ข๐ณ๐ฅ๐ฐ๐ฃ๐ซ๐ฆ๐ค๐ต๐ด.๐ค๐ด๐ท
Note!
๐You will get only sobject API Names using this method.
Here is a quick demo on the same
watch demo video on linkedin
Do Check Salesforce Documentation on sobject list
This Content was originally posted in linkedin View Post