Salesforce | Get all the documents located in 'My Personal Documents' folder

Author - Shalini

In Salesforce, we can get list of all the documents located in a particular folder by using the following query :

folderId = [SELECT Id FROM Folder WHERE Name = 'FolderName']

[SELECT Id, Name FROM Document WHERE FolderId =:folderId]

But above query doesn’t work for ‘My Personal Documents’.

To get the list of documents located in ‘My Personal Documents’ use following query :

[SELECT Id, Name,Description FROM Document WHERE FolderId = :MYUSERID]

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Salesforce customization, App development or any other software development assistance please contact us at salesforce@webners.com

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

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