Share report to bulk of groups in a single shot.

Mano R
Tera Contributor

Use case:

1. we have a requirement to add 149 groups in a single shot to the dashboard instead of adding one by one sharing option in the dashboard.

I have pasted the exact area where we need this functionality.

Please let me know if any way to achieve this functionality.

 

Thank you

8 REPLIES 8

Musab Rasheed
Tera Sage

Hello,

Check this out

https://community.servicenow.com/community?id=community_question&sys_id=e128fbf8dbcf58d04aa5d9d968961977

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Where the relationship of the shared group and dashboard gets saved. the idea behind this ask is if we got the table then using the script we would be able to insert new records to that table which should provide access to all the groups for a specified dashboard.

Mohith Devatte
Tera Sage
Tera Sage

Hello,

I think for dashboard No bulk update but i an tell you a work around 

 what ever group the report  is shared to will be stores in sys_report_users_groups table.Insert records in this table through fix script

Yes you can do it through a fix script

1) Create a fix script with the below one 

var gr = new GlideRecord('sys_report_users_groups');
grgr.insert();.initialize();
gr.report_id="your report sys_id";
gr.group_id="your group sys_id";
gr.insert();

Bu the above one inserts one report and it will be shared to that group but in order to do in bulk store all the report ID's in Array and loop the array and put the above code in loop like below

var arr=['sys_id1','sys_id2'];
for(var i=0;i<arr.length;i++)
{
var gr = new GlideRecord('sys_report_users_groups');
grgr.insert();.initialize();
gr.report_id=arr[i];
gr.group_id="your group sys_id";
gr.insert();
}

Please mark my  answer correct if it helps you

 

 

Where the relationship of the shared group and dashboard gets saved. the idea behind this ask is if we got the table then using the script we would be able to insert new records to that table which should provide access to all the groups for a specified dashboard.