- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 07:28 AM
Hello Team,
I need help here ASAP.
When the proposed by is the member of "ABC" group then assign the MIM to "ABC" group
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 08:07 AM
Hi @rmishra4395 ,
You can write before business rule and use below script.
var userGroups = new GlideRecord('sys_user_grmember');
userGroups.addQuery('user', current.proposed_by);
userGroups.addEncodedQuery('group.name=ABC');
userGroups.query();
if (userGroups.next()) {
current.assignment_group='sys_id of ABC assignement group'
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 08:07 AM
Hi @rmishra4395 ,
You can write before business rule and use below script.
var userGroups = new GlideRecord('sys_user_grmember');
userGroups.addQuery('user', current.proposed_by);
userGroups.addEncodedQuery('group.name=ABC');
userGroups.query();
if (userGroups.next()) {
current.assignment_group='sys_id of ABC assignement group'
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------