- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:08 AM
We have created a module for all employees to submit their updated resumes to. In order for all employees to view this module I need to create a role for the module and then assigned it to all employees (197)
Should i create a role and add it to a group or is only a role needed.
Also
What is the best way to distribute the role to all employees (not manually)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:47 AM
You can run the below script in System Definition > Scripts - Background
var grUser = new GlideRecord("sys_user");
grUser.addActiveQuery(); // Get only active users
grUser.query();
while(grUser.next()){
var grMember = new GlideRecord('sys_user_grmember');
grMember.initialize();
grMember.group = "sys_id of the group created";
grMember.user = grUser.sys_id;
grMember.insert();
}
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 08:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:15 AM
Hi,
It is always advised to assign the role to Group. And then add users as member of the Group.
Thank you,
Palani
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:30 AM
ok so with that being said what is the best way to solve this solution to adding the all the users to the group created

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:47 AM
You can run the below script in System Definition > Scripts - Background
var grUser = new GlideRecord("sys_user");
grUser.addActiveQuery(); // Get only active users
grUser.query();
while(grUser.next()){
var grMember = new GlideRecord('sys_user_grmember');
grMember.initialize();
grMember.group = "sys_id of the group created";
grMember.user = grUser.sys_id;
grMember.insert();
}
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 08:02 AM
ok,
im trying it out now