- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 07:28 AM
If the caller's location is 'London' , assignment group should auto populate as 'London Group'. Here assignment group is reference field.
@Ankur Bawiskar @Community Alums @Sohail Khilji
can you assist me on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 07:35 AM
you can use assignment rule for this.
Did you explore that?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 05:07 AM
Hi @Balaji Munusamy ,
I agree with Ankur on using Assignment rule!!
Also, if you want to go script way then,
Try creating a before business rule :-
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var userLoc = current.caller_id.location;
var gr = new GlideRecord('sys_user_group');
gr.addQuery('PASS LOCATION FEILD COLUMN HERE', userLoc); //Assuming this field is a reference field
gr.query();
if(gr.next());
{
current.assignment_group = gr.sys_id;
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 07:35 AM
you can use assignment rule for this.
Did you explore that?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 03:22 AM
Thank you for marking my response as helpful.
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
09-01-2023 05:07 AM
Hi @Balaji Munusamy ,
I agree with Ankur on using Assignment rule!!
Also, if you want to go script way then,
Try creating a before business rule :-
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var userLoc = current.caller_id.location;
var gr = new GlideRecord('sys_user_group');
gr.addQuery('PASS LOCATION FEILD COLUMN HERE', userLoc); //Assuming this field is a reference field
gr.query();
if(gr.next());
{
current.assignment_group = gr.sys_id;
}
})(current, previous);