I am trying to show a group of reports that are accessible by the logged in user in a VF page. Is there are any object where this info is stored ?
Any pointers would be of great help.
Thanks
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I am trying to show a group of reports that are accessible by the logged in user in a VF page. Is there are any object where this info is stored ?
Any pointers would be of great help.
Thanks
I suppose it depends on how the reports are shared.
The challenge is that access to reports is controlled by access to the folder.
Folders have access type Hidden, Public or Shared.
Public is easy enough. Everyone has access.
Shared is the hard one -- as the docs note,
Your basic list SOQL would look something like:
Select Id, Name From Report Where OwnerId in (Select Id From Folder Where type = 'Report' AND AccessType='Public')
For unfiled public reports, set the OwnerId to your OrgId.
HTH
Thx for the fun quesiton!