4

Is there a method in the salesforce API that allows you to retrieve the contents of the org as a zip file? For instance MavensMate, Illuminated Cloud, and every other Salesforce IDE I have seen has a method to retrieve Apex classes, Visualforce pages, and other records from Salesforce and puts them in to their own folders in the IDE. Does this have to be done one-by-one or can I do some kind of mass retrieve?

1
  • Most probably one by one since all items are stored in an "object".
    – raym0nd
    Mar 29, 2016 at 21:05

2 Answers 2

6

You can download an entire org using the Salesforce Metadata API which is used by most third party tools including the ones you mention and also Gearset, the service that our team is building.

Getting the right packages.xml is a bit tricky, but most things can be fetched using wild cards.

Why are you doing a mass retrieve?

3
  • I am attempting to create a Salesforce extension for VSCode. It's going well so far, but I don't know the best way to go about fetching the org
    – watzon
    Mar 29, 2016 at 21:10
  • 2
    You will need to use a mixture of the Tooling API and the Metadata API. It will require a mixture. MevensMate is open source and is built to plug into many IDEs (e.g. Atom and Sublime) so perhaps there is merit in integrating MM into VSCode rather than start from scratch. As it is OSS, it should be a good place to start to understand how to achieve what you need. Mar 29, 2016 at 21:21
  • There is also the existing closed source Welkin Suite that operates as a plugin to VSCode. You might be able to figure out some it's internal workings. Mar 30, 2016 at 1:13
0

I addition to already suggested options you may want to consider leveraging tools like: https://github.com/heroku/force or https://github.com/neowit/tooling-force.com

This way you will be able to concentrate on VSCode specific parts and leave all SFDC related heavy lifting to one of the above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .