We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8807d5 commit 2843bbaCopy full SHA for 2843bba
Server-Side Components/Background Scripts/Bulk Share - Reports/script.js
@@ -0,0 +1,14 @@
1
+var list = "4b6c76e3dbcfaf0000ec7abe3b961912,9e67d6d1db736300d43c54e848961934"; //pass user sys_id here who needs access to reports
2
+var arr = list.split(",");
3
+for(i=0;i<arr[i].length;i++){
4
+ var rep = new GlideRecord('sys_report');
5
+ rep.addEncodedQuery('sys_created_by=abc@gmail.com');//replace with appropriate user mail who creaed the report
6
+ rep.query();
7
+ if(rep.next()){
8
+ var usr = new GlideRecord('sys_report_users_groups');
9
+ usr.initilize();
10
+ usr.user_id = arr[i];
11
+ usr.report_id = rep.sys_id;
12
+ usr.insert();
13
+ }
14
+}
0 commit comments