How to assign assignment group as per location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 03:27 AM
I am working on catlog item, my requirement is when line manager approve a request then it should be assign to that particular team as per the location.
In UI there is location field if requestor will select any location .
so according to that location it should be assign to that particular location team.
For this i have to create workflow. I m trying it with Run script
please provide solution on it.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 04:32 AM
Hi @RunaliP ,
If you have created location field on group table then use below script.
var groupSysId='';
var loc = current.variables.current_location; // Assuming "current_location" is the variable name
var gr = new GlideRecord('sys_group'); // Replace with your table name
gr.addQuery('location', loc; // Assuming location is field name in group table
gr.query();
if (gr.next()) {
groupSysId = gr.sys_id;
}
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------