Just a little background on my situation, I'm a new Admin/Developer for Salesforce, my company recently started using Salesforce and I'm trying to fulfill all the needs as they come. I have NOT had the time to go through any formal training on Salesforce Admin/Dev, I do have .Net programming experience though.

What I need help with is an issue with downloading Files/Attachments from an Opportunity, currently we have users that will upload 5-15 PDF's to an Opportunity and a different user will need to download all the files to process them in another system. Currently I don't see any way to "Download All Files" so the users have been downloading them one at a time and when they have 5-10 different Opportunities like this it becomes a time consuming task.

I have been tasked with finding an efficient way to download all the files/attachments inside of Salesforce, to accomplish this task I was trying to access the attachments from Apex so I could work with them programmatically. Currently the Files are of type ContentDocument and I can't access them without referencing ContentDocumentLink and Opportunity, I can't find a way to actually download the Files using ContentDocument and its a pain to reference each one this way. Is there a way for them to be uploaded as Attachments? Again I am very new, so feel free to suggest better methods to accomplish this task!


1 Answer 1


Please consider using AppExchange free solutions. SF files structure is not as simple as it usually looks. See the three options that SF gives here and see if they are going to fit your needs.


If you decide to go with custom code I can also give you some pointers, but I would leave that as a last resort.

And keep in mind the SF priority level to solve issues:

  1. Try Standard functionalities.
  2. Try declarative
  3. Go to the AppExchange
  4. If AppExchange too expensive or not a good fit, only then -> CODE

You must log in to answer this question.

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