You need to sign in to do that
Don't have an account?
User community does not see attachments in related lists, but see in File tab
Hi
I have in my Org a custom object called Documento__c, where I only fill some fields and attach a file on its records.
I have a partner community too, where the community users shoud see these Documento__c records, and all the attachments.
The problem is, the portal users cannot see the attachments, unless the user be the attachment owner.
I know there are two kinds os "Attachments" that can be used in these "Notes and Attachments" related lists:
- Attachment: That is directly related with the parent record, and nothing else.
- File: That is a user file, witch is shared with the record at the moment it's uploaded. In this case I can see this file in the "Files" tab, and share with other records, groups and libraries too.
In both cases, they apear in the "Notes and Attachments" related lists.
With "Attachment" Attachs, everyone can see them, but everytime someone upload a file in these Attachments lists, it goes as a "File" instead "Attachment"
I know there is a option in the Org settings that changes this behavor, but it seems just works with non lightning layouts, which is not my case, and furthermore there are lots of "files" alread attached at this lists that wont be affected with this change.
I already tried to create a libary, to add the portal users on it, then to attach the "file" and share the attached file with the libary.
When a do it, the portal users can see the file only at the "Files" tab, inside the libary.. but the "Notes and Attachments" related lists continue not showing the attachment file.
Follows an example, to better undertanding..
A internal user named "Desenvolvimento" attached 2 files:
- "teste" was uploaded as a "File"
- "teste 2" was uploaded as a "Attachment"
Then the user created a libary called "Comunidade"(1), added the partner users (2), and shared the "test" file with it:
The patner user logged in the community, opens the "File" tab and sees the file there:
But in the record related list, it does not apear.. only the "Attachment" apears.
Some sugestion how can this Files be displayed in the Attachments related lists to the partner community users?
Thanks!
This single line of code for an APEX Trigger will flag all uploaded files so that all users in the Community can see them: