Skip to content

Commit 2c88570

Browse files
script.js
1 parent de816bb commit 2c88570

File tree

1 file changed

+8
-0
lines changed
  • Server-Side Components/Background Scripts/Report Ownerships

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var grReport = new GlideRecord('sys_report_users_groups');
2+
grReport.getEncodedQuery('user_id.nameLIKEJaspal');//replace the query correctly for the reports that requires ownership change
3+
grReport.query();
4+
while (grReport.next()) {
5+
grReport.user_id = "20db787ec374bd58265fdf3c05011234"; //replace sys_id with relevant sys_id of the user who will have the ownership updated to
6+
grReport.autoSysFields(false);
7+
grReport.update();
8+
}

0 commit comments

Comments
 (0)