I would like to know the list of Salesforce objects whose are based of FILE type. For example Document, Attachments, ContentVersions, Static Resources etc

I would like to see what more objects comes into these list. Any help on this question - will really helpful

  • 1
    You've already identified all of the main players. There are certainly a few less-common edge cases, like Classic Knowledge articles that contain File fields. What is your overall goal?
    – David Reed
    Feb 15 at 15:20
  • @DavidReed We are using Ownbackup tool to backup data of our full sandboxes. We are getting warnings for Attachments, Documents, ContentVersion, Static Resource data - that it's not backed up due to exceeding API download limit. And Ownbackup gives a checkbox to exclude FILE related objects from Backup - so before I configure this checkbox - I would like to know which objects comes in FILE related one. Feb 16 at 10:45
  • You should ask OwnBackup exactly what that option does as it may not be the same as the answer you receive here.
    – David Reed
    Feb 16 at 14:39

One way to achieve this would be to examine the field metadata on all sObject types that you can access. You are looking for any field that has the base64 data type. That would have a capacity to store file date (in theory at least).

This is true for:

I also found:

This wasn't an exhaustive search though. You will likely need to use the REST API describe resource or the Partner API describe web methods for a more complete check. Or even an Apex describe.

Note that not every base64 field would represent a file. Especially one you could write to. But it will go a long way to finding the ones you can access in a particular org.


Not the answer you're looking for? Browse other questions tagged or ask your own question.