---
schema_version: "1"
id: eb120fd7d6e4ec9e214a9f5b83210b48d6318489cc0e149a52bfbb2aad81854d
title: AttachedContentDocument
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_attachedcontentdocument.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attachedcontentdocument.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f51d17c7e25aa2552bc3ad1ac41837c4d4a9ab8a24158a1eef344d92fb993bd8
description: This read-only object contains all ContentDocument objects associated with an object.
---
# AttachedContentDocument

This read-only object contains all ContentDocument objects associated with an object.

## Supported Calls

describeSObjects()

## Special Access Rules

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Beginning in Summer ’26, Chatter is default turned off in all new orgs. For any features in these orgs that require access to Chatter functionality or the Chatter APIs, turn on Chatter by going to **Setup** | **Chatter Settings** and selecting **Enable**. For details, see [Chatter Is Turned Off by Default in New Orgs Beginning in Summer ’26](https://help.salesforce.com/s/articleView?id=experience.collab_chatter_default_off.htm&type=5&language=en_US).

## Fields

| Field Name | Details |
| --- | --- |
| ContentDocumentId | 
Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the attached ContentDocument.

This is a relationship field.

Relationship Name

ContentDocument

Relationship Type

Lookup

Refers To

ContentDocument



 |
| ContentSize | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

The size of the document in bytes for notes smaller than 2 GB.

In API version 66.0 and later, we recommend that you use the ContentSizeLong field even for notes smaller than 2 GB.





 |
| ContentSizeLong | 

Type

long

Properties

Filter, Group, Nillable, Sort

Description

The size of the note in bytes up to 10 GB.

This field is available in API version 66.0 and later.





 |
| ContentUrl | 

Type

url

Properties

Filter, Group, Nillable, Sort

Description

URL for links and Google Docs. This field is set only for links and Google Docs, and is one of the fields that determine the FileType.

This field is available in API version 31.0 and later.





 |
| ExternalDataSourceName | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Name of the external data source in which the document is stored. This field is set only for external documents that are connected to Salesforce.

This field is available in API version 32.0 and later.





 |
| ExternalDataSourceType | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Type of external data source in which the document is stored. This field is set only for external documents that are connected to Salesforce.

This field is available in APIAPI version 35.0 and later.





 |
| FileExtension | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

File extension of the attached ContentDocument.

This field is available in API version 31.0 and later.





 |
| FileType | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Type of document, determined by the file extension.





 |
| LinkedEntityId | 

Type

reference

Properties

Filter, Group, Sort

Description

ID of the record the ContentDocument is attached to.

This is a relationship field.

Relationship Name

LinkedEntity

Relationship Type

Lookup

Refers To

Account, Accreditation, ActivationTarget, ActivationTrgtIntOrgAccess, ApiAnomalyEventStore, AssessmentIndicatorDefinition, AssessmentTask, AssessmentTaskContentDocument, AssessmentTaskDefinition, AssessmentTaskIndDefinition, AssessmentTaskOrder, Asset, AssetRelationship, AssignedResource, Award, BoardCertification, BusinessLicense, BusinessMilestone, BusinessProfile, Campaign, CareBarrier, CareBarrierDeterminant, CareBarrierType, CareDeterminant, CareDeterminantType, CareDiagnosis, CareInterventionType, CareMetricTarget, CareObservation, CareObservationComponent, CarePgmProvHealthcareProvider, CarePreauth, CarePreauthItem, CareProgram, CareProgramCampaign, CareProgramEligibilityRule, CareProgramEnrollee, CareProgramEnrolleeProduct, CareProgramEnrollmentCard, CareProgramGoal, CareProgramProduct, CareProgramProvider, CareProgramTeamMember, CareProviderAdverseAction, CareProviderFacilitySpecialty, CareProviderSearchableField, CareRegisteredDevice, CareRequest, CareRequestDrug, CareRequestExtension, CareRequestItem, CareSpecialty, CareSpecialtyTaxonomy, CareTaxonomy, Case, CodeSet, CollaborationGroup, CommSubscription, CommSubscriptionChannelType, CommSubscriptionConsent, CommSubscriptionTiming, ConsumptionSchedule, Contact, ContactEncounter, ContactEncounterParticipant, ContentWorkspace, Contract, ConversationEntry, CoverageBenefit, CoverageBenefitItem, CredentialStuffingEventStore, CreditMemo, CreditMemoLine, Dashboard, DashboardComponent, DataStream, DelegatedAccount, DocumentChecklistItem, EmailMessage, EmailTemplate, EngagementChannelType, EnhancedLetterhead, EnrollmentEligibilityCriteria, Event, HealthcareFacility, HealthcareFacilityNetwork, HealthcarePayerNetwork, HealthcarePractitionerFacility, HealthcareProvider, HealthcareProviderNpi, HealthcareProviderSpecialty, HealthcareProviderTaxonomy, Identifier, Image, IndividualApplication, Invoice, InvoiceLine, Lead, ListEmail, Location, MarketSegment, MarketSegmentActivation, MemberPlan, MessagingSession, MktCalculatedInsight, OperatingHours, Opportunity, Order, OrderItem, Organization, OtherComponentTask, PartyConsent, PersonEducation, PersonLanguage, PersonLifeEvent, PersonName, PlanBenefit, PlanBenefitItem, Product2, ProductFulfillmentLocation, ProductItem, ProductItemTransaction, ProductRequest, ProductRequestLineItem, ProductRequired, ProductTransfer, ProfileSkill, ProfileSkillEndorsement, ProfileSkillUser, ProviderSearchSyncLog, PurchaserPlan, PurchaserPlanAssn, ReceivedDocument, Report, ReportAnomalyEventStore, ResourceAbsence, ResourcePreference, ReturnOrder, ReturnOrderLineItem, ServiceAppointment, ServiceResource, ServiceResourceSkill, ServiceTerritory, ServiceTerritoryMember, ServiceTerritoryWorkType, SessionHijackingEventStore, Shift, Shipment, ShipmentItem, Site, SkillRequirement, SocialPost, Solution, Task, ThreatDetectionFeedback, User, Visit, VisitedParty, Visitor, VoiceCall, VolunteerProject, WorkBadgeDefinition, WorkOrder, WorkOrderLineItem, WorkType, WorkTypeGroup, WorkTypeGroupMember



 |
| SharingOption | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

Controls whether or not sharing is frozen for a file. Only administrators and file owners with Collaborator access to the file can modify this field. Default is Allowed, which means that new shares are allowed. When set to Restricted, new shares are prevented without affecting existing shares.

This field is available in API versions 35.0 and later.





 |
| Title | 

Type

string

Properties

Filter, Group, idLookup, Sort

Description

Title of the attached ContentDocument.





 |

## Usage

Use this object to list all ContentDocument objects attached to an object via a feed post.

To retrieve ContentDocument objects, issue a describe call on an object, which returns a query result for each activity since the record was created. You can’t directly query this object.