Been spending a long time trying to get all the info about a report programmatically using apex. One place I'm stuck at is how to get the folder name where the report is located in, and also its permissions, which means what role do you need in order to access this report. Take a look at this image for example.
Basically I just need to get the name "Folder for Testing", since that is where my report is located in.
I've tried using several methods from metadata api, reportResults, reportExtendedMetadata, but still no luck. I thought I would be able to do it using a SOQL query, but I'm still working on that. Any help is much appreciated.
Thanks.
Best Answer
The
Report
object has aFolderName
field that should contain what you are looking for. As for how to run the query, I personally would just run it through theDeveloper Console
(it has aQuery Editor
tab). You can add fields you care about to yourSELECT
clause.