- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017 11:38 AM
Thank you Pradeep,
I tried but for it is not working. User group has a related list with table Group Location Coverage [sys_group_covers_location] and then location field on this table is referenced to Location table. Please advise.
Thank you
Below is the script that I'm using !.
(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('sys_group_covers_location.location', userLoc); //This field is a related list on the user groups
gr.addQuery('type', "mission_it");
gr.query();
if(gr.next());
{current.assignment_group = gr.sys_id;
}
})(current, previous);