I would like to setup a dev environment using Visual Studio Code. I'm able to do that with the help of Salesforce Extension Pack. I want to fetch all custom object in VS Code. How Can I achieve this?


To achieve this goal in the VS Code you can use two ways. Please find below

  1. Package.xml => Add Object member type in package.XML
  2. Org browser Extension => You can Retrieve selected components like custom objects. Org Browser Extension
| improve this answer | |

you can run this command: sfdx force:source:retrieve -m CustomObject

you can also added the node CustomObject to your package.xml file

| improve this answer | |
  • Where Should I run this command in Command Palette (Ctrl + Shift +P)? – Ravi Shah Jul 2 at 12:23
  • 1
    @RaviShah Ctrl+Shift+~ to open the Terminal, then run it from there. – sfdcfox Jul 2 at 12:57

You can run the command: sfdx force:source:retrieve -m CustomObject in the VS code terminal Alternatively, I found a VS Code extension using which you you can fetch metadata from the org - 'Salesforce Package.xml Generator Extension for VS Code'. Try installing and using it. Using it , you can update package.xml and use it to fetch the metadata

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.