1

I'm currently trying to backup the attachment files from old cases and emails in our Salesforce org through an automated process. I first tried to do this with the Bulk API but sadly this doesn't allow me to export the body column of attachments.

I did manage to pull this data out with the dataloader via command line (and the FileExporter tool). Now what I would like to do is export only those attachments that are attached to old emails or cases.

Is it possible to use a collection of ID's (preferable in a file) from those parent objects in the WHERE clause of the query in the beans file? If so, could somebody post an example?

Something along the lines of:

entry key="sfdc.extractionSOQL" value="SELECT Id, Body FROM Attachment WHERE id IN parentIdFile.csv"/>

Would be much appreciated!

Twan
  • 155
  • 3
  • 7
  • How are you calling this batch process? I'm assuming your batch script includes a line like `process %configdir% WhateverYourBeanNameIs`, correct? You may need to go a step further and call java directly, explicitly passing in the `sfdc.extractionSOQL` parameter with a SOQL string containing a comma-delimited list of IDs. See a somewhat-relevant example from an old answer here (http://stackoverflow.com/a/12093003/361599). If this is an option, let me know and I'll write up a full answer with an example for this specific situation. – JCD Mar 18 '14 at 18:26

0 Answers0