Is there any relationship between salesforce Reports and Folder objects, to determine the content of the folder or find the residing folder of a particular report ?


4 Answers 4


The Report object does not have a FolderId field like Dashboard, Document and EmailTemplate objects. But as you can see from this their does exist a child relationship between Folder and Report, which is in fact determined by the OwnerId of the Report.

Thus once you know the folder Id you can query for reports that are contained within it.

SELECT Id, DeveloperName,Name,Type FROM Folder 
  WHERE Name = 'My Test Folder' And
              Type = 'Report' 

Then query by OwernId with the Folder Id returned e.g.

SELECT Description,DeveloperName FROM Report WHERE OwnerId = '00lG0000000TwG5IAK'

enter image description here


Reports can be created in public folders or in personal folders. It all depends on whether you want to make them available for others to use. For more details on the subject, you might want to look at Using the Reports Tab.


you could create a custom report type on report object and by editing its layout, using folder lookup relationship pull any folder fields needed. Creating a report using this report type will show folder details along with report's.


If you don't need to access Reports or Folders in code then you can simply use the 'Reports' administrative Report Type, to view all public reports and any in your My Personal Reports folder, along with the folders that they're contained in.

You'll need the 'View Setup and Configuration' permission in order to access this Report Type see here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .