Salesforce Content Management : Data Model
Before we start with Salesforce files data model, you can refer to the link to understand the Differences Between Files, Salesforce CRM Content, Salesforce Knowledge, Documents, and Attachments
If you’re searching for a single object called “File” in Salesforce, you won’t find one. Instead, Salesforce Files are built on a data model that consists of three core objects: ContentDocument, ContentVersion, and ContentDocumentLink.
Here’s a simplified breakdown of what each one represents:
ContentDocument - the parent object of both ContentVersion and ContentDocumentLink, represents an individual file in Salesforce.
ContentVersion - records represent all the versions of that file, past and present.
ContentDocumentLink - represents the link to entities the file is shared with, whether it's users, groups, records, or libraries.
| Object | Description | Stores |
| ContentDocument | Represents the file as a whole | Metadata like name, owner, type |
| ContentVersion | Stores actual file data | Binary content, title, version number |
| ContentDocumentLink | Links the file to records/users/groups | Relationship, share type, visibility |
Now, let's look at each of these objects in detail and get a better understanding of how they work together.
delete(), describeLayout(), describeSObjects(), query(), retrieve(), search(), undelete(), update()
create(), describeLayout(), describeSObjects(), query(), retrieve(), search(), update(), upsert()
create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()
ContentDocumentLink Key fields
ContentDocument Developer Guide
ContentVersion Developer Guide
ContentDocumentLink Developer Guide
005314319

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.