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 ?
[SalesForce] How to find the folder of a salesforce report
Related Topic
- [SalesForce] How to find Find Scheduled Report Recipients from the code
- [SalesForce] User cannot view the report even though the report folder is shared with the user
- [SalesForce] Insufficient Permissions to access a report
- [SalesForce] Report Folder visible to all users even when not shared
- Find the location/folder of a report programmatically
Best Answer
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.
Then query by OwernId with the Folder Id returned e.g.