- 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 08:50 AM
i ran it and it worked in scripts background thank you!
last question and excuse my ignorance but where do i apply this script too.... the group itself or to the module?