In Salesforce UI, I can assign access to Document Folders.

How can I determine who has access to a Document Folder with Apex or API? I thought I would find an object like "FolderMember" or similar, but no luck as of yet. Maybe I missed it?


enter image description here


As far as I can tell, the only object that exposes this is the DocumentFolder object, which is only in the Metadata API. Calling the Metadata API from Apex Code is non-trivial, but as long as you follow the rules for retrieving DocumentFolder, this should help you.

| improve this answer | |
  • Thanks! I needed to use Metadata API to retrieve the DocumentFolder. It includes a nested type sharedTo with elements for the roles, groups, and portal roles the folder is shared with. – Doug Ayers Jun 3 '18 at 0:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.