Report Retirement for Inactive Users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 06:18 AM
Hello,
Is there a way to retire all reports that were created by inactive users?
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 06:29 AM
There is no direct way but you need to use 1 time fix script for this
If you don't require those reports then you can query sys_report table and check the created by user is inactive.
If yes then mark the report as active=false
There is no direct way but you need to use 1 time fix script for this
If you don't require those reports then you can query sys_report table and check the created by user is inactive.
If yes then mark the report as active=false
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 02:09 AM
Did my reply answer your question?
If my response helped please close the thread by marking my response as correct so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 12:10 AM
Hi @Ankur Bawiskar , if the report is "Active = false",
1)Can this report be used in the dashboard?
2)If this report already published in Dashboard, it is will still visible?
3)Is this report able to search or link of this report able to use again?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 06:53 AM
Hi @adamtoth ,
You can use below script either in fix script or scheduled job if you want to make it automation. You can run job once in a year.
var gr = new GlideRecord('sys_report');
gr.addEncodedQuery('created_by_user.active=true');
gr.query();
while(gr.next()) {
gr.active = false;
gr.setWorkflow(false);
gr.update();
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------