function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raghu Natha 2Raghu Natha 2 

Need SOQL or a way to find a running user on the Reports

Hi,

How to find all the reports whose running user id is 005f2000001AbUF

For Dashboards I got the same by using the following query:
select id from Dashboard where RunningUserId='005f2000001AbUF'

Thank you,
Raghu

 
Raj VakatiRaj Vakati
Like this

 
List<Dashboard> dbs=[select id, Title from Dashboard where Type='SpecifiedUser' and RunningUserId=:theUser.id];

Link

http://bobbuzzard.blogspot.com/2011/03/deactivating-users-that-are-running.html​​​​​​​
Raghu Natha 2Raghu Natha 2
Raj,

on executing the above query the result shows the list of dashboards only.
I am trying to get the list of reports which are scheduled and has a specific Running user

User-added image

 
Raj VakatiRaj Vakati
I am not sure for the reports But on the report object there is no field "RunningUserId" so i guess its not possible 


You can create a project with all report and find the runnning user in the folder metadata 
Raghu Natha 2Raghu Natha 2
Thank you for the response Raj