Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
Most probably one by one since all items are stored in an "object". – raym0nd Mar 29 at 21:05

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?

share|improve this answer
    
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 – mascaliente Mar 29 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. – Kevin Boyle Mar 29 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. – Daniel Ballinger Mar 30 at 1:13

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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