How to access the All Internal Users folder on Apex – DevFacts | Technology Blog | Developer Community – News Block

In Salesforce we can create different folders for use by internal users. everyone is under CollaborationGroup.

To access the “All Internal Users” folder in Salesforce Apex, you can use the standard object CollaborationGroup. This object represents the folder, and you can query it using Apex code to retrieve the folder and its contents. You can also use the SOQL query to filter the results based on specific criteria, such as name, type, or owner.


List<CollaborationGroup> folderList = (SELECT Id, Name, CollaborationType, OwnerId FROM CollaborationGroup WHERE CollaborationType="Files");

This query will return all folders of type “Files”, and you can access their properties, such as ID, Name, and Owner ID. You can also scroll through the folder list to get the details of each folder.

Note: Make sure the Apex class has the necessary permissions to access the “CollaborationGroup” object.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top