I have just installed and configured Visual Studio Code. I have authorized my staging organization which contains a grip of apex classes and custom objects. How can I download the existing code into the newly created project?
I get no results with:
sfdx force:source:retrieve --sourcepath c:\Users\*****\Projects\****\force-app
Another option is to use the
SFDX: Create Project With Manifest command in VS Code (equivalent to using
sfdx force:project:create with the
--manifest option), which will create your project with a
manifest/package.xml file, that includes wildcard selectors for all the custom code types: ApexClass, ApexComponent, ApexPage, ApexTestSuite, ApexTrigger, and AuraDefinitionBundle, as well as StaticResource. Once you’ve authorized to a dev org or sandbox org that has code in it, you can use
SFDX: Retrieve Source in Manifest From Org within VS Code. You can right-click on the package.xml file or use the command palette to find the command. This command is equivalent to
sfdx force:source:retrieve -x ./manifest/package.xml.