How to make an attached document to record visible only for the owner of record (custom object) and not visible for other users (for wish record is visible)?
1 Answer
If you are using document object, you can control the visibility from its folder.
If you are using file, then you control its visibility using the contentdocumentlink.
If files are being uploaded from file related list, You need to have a trigger which delete the contentdocumentlink pointing to the record and just keep the contentdocumentlink pointing to person who actually uploaded the file.If you don't want to access to him as well, you need to create another link to owner of the object record and delete the contentdocumentlink for user who uploaded the file.