Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Consider a case where users who had created reports are no longer part of the organization i.e. are Active=False, however the reports needs to be edited to make it useful further. How about getting this worked by updating the ownership of report from backend.
Use script attached as background script to update the ownership of reports.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var grReport = new GlideRecord('sys_report_users_groups');
grReport.getEncodedQuery('user_id.nameLIKEJaspal');//replace the query correctly for the reports that requires ownership change
grReport.query();
while (grReport.next()) {
grReport.user_id = "20db787ec374bd58265fdf3c05011234"; //replace sys_id with relevant sys_id of the user who will have the ownership updated to
grReport.autoSysFields(false);
grReport.update();
}
Loading