Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2024 12:33 PM
Hi Rhonda,
I can see that the script is not running because your condition is never true. Service offering is a reference field, and as such stores the sys_id of the record as it's value. You can select the name using Filter conditions, or change your condition to
current.service_offering.name == 'ACD' || current.service_offering.name == 'Call Center'
In the script, you can dot-walk to the caller's location's support so no GlideRecords are needed
function executeRule(current, previous /*null when async*/ ) {
// Check if the affected user (caller_id) is set
if (current.caller_id) {
if (current.caller_id.location) {
if (current.caller_id.location.u_location_support) {
// Set the Assignment Group field to the location's Location Support
current.assignment_group = current.caller_id.location.u_location_support;
// Set the Assigned To field to the location's Assignment Group
current.assigned_to = current.caller_id.location.u_assignment_group;
}
}
}
})(current, previous);
The last line doesn't make sense - assigned_to is a person, and location.u_assignment_group sounds like a group