So I have a ContentVersion that gets added to a record, then I create a ContentDocumentLink record connecting that File to the Library. That Library includes community users. How come they can't see the files, do I have to create another record of some sort? I check the library and the new file is there.

  • I'm not sure the answer to this, but did you check the saretype when creating the ContentDocumentLink record? I know visibility doesn't affect libraries, so that is the only thing I can think that is affecting it. – Roti Oct 30 at 16:42
  • I have it as 'I' because it's in a library – Peter Luo Oct 30 at 16:44
  • Hmm, "I" sounds like the correct sharing type for Libraries. Have you tested with other files (not posted to records first, but uploaded directly to that library) to see if the community user can see it? Just want to rule out an issue with the libreary visibility itself. – Roti Oct 30 at 16:46
  • Yeah if I add a file to library and then add that file to the record through the UI, it works. I'm thinking maybe it's a different record that manages the permission between the library and the community or something weird – Peter Luo Oct 30 at 16:50
  • Hmm, interesting. "For organizations with Communities enabled, a document can only be shared with users and groups that are a part of the community the file was created in." developer.salesforce.com/docs/atlas.en-us.api.meta/api/… – Roti Oct 30 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.