Reporting on Attachments via
Reporting on Attachments via

Reporting on Attachments via

08/07/2014 by Sylvia Cabral
A process for exporting and reporting on the attachments within your Salesforce org using

Currently, it is not possible to report on attachments within Salesforce directly so it has been a challenge in the past to access information about attachments that exists within the Salesforce org. As an organization, you may want to track what types of attachments are being utilized and on which records. Data loaders not only allow you to see all of the information about the attachment (name, description, created data, etc.) but will actually extract the attachment itself. You will end up with a zip file of all of the attachments that you want to see or report on within your Salesforce org. I will walk you through one of my favorite data loaders and show you how it can help you access your attachments.

This data loader can be used by any Salesforce org, including Group and Professional (API is not needed). It works very smoothly and quickly for importing and exporting data and the same is true for exporting attachments; the process only takes a few steps. It will give you a report with the attachment fields that you selected as well as the actual attachments within that report all neatly packaged in a zip file.

Accessing your Attachment Data

Once you have logged into your Salesforce org via the, you can select Task → Export → Attachments → Select Fields → Add Filter (optional) → Save & Run. It’s really that easy. 

After you successfully run it, you see a link with your attachments that you can click. This will download as a zip file and when you open the file you will see your attachment report spreadsheet and all of the attachments.

 Reporting on Your Attachment Data

When you open the attachment export spreadsheet you will see that it provides all of the fields you selected, which you can then use for reporting. You can filter and sort by many of the fields such as created date, IDs for users who created it, and IDs for the parent record that the attachment is related to in Salesforce.

Note: The body field is the one designated for the actual attachment so that field will always be empty on the spreadsheet and can just be removed after the export.

Since the export only provides IDs, as you may have already noticed, here’s a tip for interpreting IDs that will help decipher what object the Parent ID is referring to in the report. The 1st, 2nd or 3rd characters of a Salesforce ID will tell what object it is. For example, Accounts begin with 001, Contacts begin with 003, Opportunities begin with 006, and Users begin with 005. Custom objects are slightly different and begin with a0. Then the next two characters for your custom objects will let you know which custom object it is.

With this information in hand, you can use a formula or filter from the Parent ID column to see all of the attachments for a particular object. For example, you can filter Parent ID to show all IDs containing 003, which will be all of your Contacts. This is a quick and easy way to isolate your attachment groups. That’s pretty much it; attachment reporting made easy.

If you have never ventured into getting attachment data, you will find the process is not as complicated as it may first seem. With access to great tools like the, you can gather this information within minutes and now you have some tips that will hopefully give you ways to also easily report on your data.

If you have a great way to access and report on attachments and would like to share your story, please feel free to comment below, on our Facebook page, or directly at me on Twitter @sylviacabral44 on the Salesforce Success Community.