0

I am trying to export attachments from Salesforce using Apex Data Loader. I am using the below query in Apex Data Loader.

Select Id, Name, ParentId, ContentType, BodyLength, Description from Attachment where Parent.Type = 'Account' limit 10

The above query provides only a csv with the above contents.

How do I export the actual attachments? I have done importing attachments into Salesforce by using zip file, but not sure how to export the attachments.

Can someone help?

Also, I don't want to use data export or other tools.

1

Data Loader currently does not support exporting attachments. As a workaround, you need to use the weekly export feature in the online application to export attachments.

enter image description here

See Export Data to learn more

3
  • I have submitted an export over a week ago and it is not finished yet. I have opened up a case with Salesforce support on it and yet to receive a reply. Any other way to export attachments out of salesforce, for ex, apex with soap or something like that? Feb 19 at 19:07
  • Hi Balaji - There's no SLA on how long a Data Export request will be completed, and it is dependent on many factors for example Data export Size, Traffic on the queue..The doc says It may be expected for a request to take longer than a week to complete (help.salesforce.com/…). My suggestion is to please empty your recycle bin and ask Support to run Physical Deletes against your org, to reduce the number of hard deleted records. You can also look at dataloader.io as an option(dataloader.io/dealing-attachments). Hope this helps Feb 19 at 19:25
  • Hi @Anudeep, thanks for your response. The problem with using dataloader.io is two fold. 1) The free version allows to query only 1000 records and 2) it is hard to convince my company to authenticate our production org with dataloader.io though it is from mulesoft which in turns owned by Salesforce. Feb 19 at 21:15

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.