I have a client that needs to extract data on a button click and save a formatted file to a specific directory on the users pc. This is so a dos batch process can pick up the file and process it. Any ideas? Ideally, they would like to launch the dos batch from Salesforce as well.


I don't think you'll ever find a way to fire the batch job from Salesforce. It seems to me that the best way to do this would be to build a locally installed app that when opened connects to Salesforce and pulls the data out, storing it where required.

Something that might work would be to create a Visualforce page that is actually a valid batch file and returns a particular mime type, but they're still going to need some local software that the batch runs (like dataloader) unless you can 'hard code' the data in the batch file itself as strings, which then get written into a file using a command like echo.

  • Thank you for the response, more of a confirmation of what I was afraid the answer was. I had been thinking maybe a nodejs app or something might work, will probably go down that route next.
    – JimRae
    Apr 23 '14 at 13:15
  • One thing I have done before is have a scheduled batch job on a windows server, that triggered data loader to extract info to a local file, and then ran the CSV through an inline editor to clean it up. Might be an option, a button in the org could just be used to flag data as 'ready' for extraction when the next job runs.
    – Matt Lacey
    Apr 24 '14 at 0:44

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.