- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 05:13 AM
Hi all
Can anyone help me to resolve this issue please.
When an user login to ServiceNow support portal to create an incident . If the user is a member of group called X and have role called XY then assignment group auto assign to Service consultant group.
I used below business rule but its not worked.
Also try to create an Assignment rule for this that's also not work.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 05:24 AM
If you do decided to use an assignment rule, it runs in the user context so you can use the GlideUser API. This is assuming you're wanting to check the user logging the ticket, not the caller (as they could be different if the user is raising on behalf of someone.
(function(current, gs) {
if (!gs.getUser().hasRole('XY_ROLE'))
return;
if(!gs.getUser().isMemberOf('GROUP_NAME_OR_SYS_ID'))
return;
//They have the role and group
current.setValue('assignment_group' , 'sys_id_of_group'); //pull the group from a system property;
})(current, gs)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 05:29 AM
you can either use before insert business rule or assignment rule
business rule condition:
Use Actions tab and set the group
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 05:24 AM
If you do decided to use an assignment rule, it runs in the user context so you can use the GlideUser API. This is assuming you're wanting to check the user logging the ticket, not the caller (as they could be different if the user is raising on behalf of someone.
(function(current, gs) {
if (!gs.getUser().hasRole('XY_ROLE'))
return;
if(!gs.getUser().isMemberOf('GROUP_NAME_OR_SYS_ID'))
return;
//They have the role and group
current.setValue('assignment_group' , 'sys_id_of_group'); //pull the group from a system property;
})(current, gs)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 05:29 AM
you can either use before insert business rule or assignment rule
business rule condition:
Use Actions tab and set the group
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2025 04:07 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader