The CreatorCon Call for Content is officially open! Get started here.

How to share many reports (in bulk)?

jas101
Tera Expert

Hi guys, is there anyway you can share many reports to groups or users without having drill into each report and go to 'Sharing' i.e. ideally from a list view edit? Thanks.

9 REPLIES 9

Below link might be helpful

https://community.servicenow.com/community?id=community_blog&sys_id=5bdd6ae9dbd0dbc01dcaf3231f961997

dvp
Mega Sage

Hey

Any update on this?

If one of the responses provided above answered your question, please mark the response as correct so that others in the future can find it quickly and that it gets removed from the unanswered list.

Hey, I couldn't get this working for my specific scenario unfortunately i.e. add a group or ideally just a given list of users to a lot of reports (e.g. all the reports created by a given individual - in our case one that is leaving the company). If you have any ideas that would be great. Thanks.

Here is the sample script that share the report to two new users.

For your scenario you to need add a top query to filter the reports created by  a  user

var arr = ['b282abf03710200044e0bfc8bcbe5d28', 'be826bf03710200044e0bfc8bcbe5dfc'];

for(i=0;i<arr.length; i++){
	var gr = new GlideRecord("sys_report_users_groups");
	gr.initialize();
	gr.report_id = 'ef8eaca147302200e0ef563dbb9a716a';
	gr.user_id = arr[i];
	gr.insert();	
}

Shamma Negi
Kilo Sage
Kilo Sage