+ Start a Discussion
Phuc Nguyen 18Phuc Nguyen 18 

File Visibility always set to All users

I am copying contentdocumentlink to another object
cdl.ShareType = 'I';
cdl.Visibility = 'InternalUsers';

But the visibilty when I look at the fileis 'All Users', why is that?  I need it to be private.

Best Answer chosen by Phuc Nguyen 18
Foram Rana RForam Rana R
  • When there are no communities defined in the org, a  File shared with a record will have default visibility set to AllUsers.
  • When there is at least one community defined in the org, a File shared with a record will have its visibility set to InternalUsers, by default.

Foram Rana