Community (Experience Cloud) users cannot see files (uploaded as ContentDocumentLink) related to records they have access to, unless the "Customer Access" setting is enabled for those files.
Root Cause:
Salesforce Files require manual toggling of the Customer Access setting for each uploaded file. There's currently no out-of-the-box setting to enable this by default for new or existing files.
This is a known limitation confirmed in the following Salesforce IdeaExchange posts:Clarification: Related IdeaExchange Post:
Option to set Customer Access on Files by Default
This link leads to a Salesforce IdeaExchange post, where customers have requested Salesforce to add the ability to set Customer Access = ON by default when files are shared to a record.
This is an IdeaExchange post, not an active feature.
Apex Trigger for New Filesfor example:trigger SetFileVisibility on ContentDocumentLink (before insert) {
for (ContentDocumentLink cdl : Trigger.new) {
cdl.Visibility = 'AllUsers'; // Makes file visible to internal and external (community) users with access to the record
}
}
005101347

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.