- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2013 05:38 PM
I would like to use an assignment rule to assign an incident to the correct service desk group based on the callers geo location contained in the users record.
Any help on how to script this would be greatly appreciated - all my attempts have failed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2013 11:19 PM
I have successfully used the following script to assign the group based on the users location.
var gr = new GlideRecord('sys_user');
if (gr.get(current.caller_id)){
var sd = gr.u_service_desk_geo;
current.assignment_group = sd;
}
However I am still having trouble setting the cmdb_ci value with the assignment rule script;
current.cmdb_ci = 'GSA';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2013 06:06 PM
In your condition select 'Related Records'; very bottom of list and blue. This allows you to dot walk to related records.
Then select 'Caller'; this give you the User record field
Then select 'GEO Location'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2013 08:49 PM
Terri, thank you for your reply.
I initially tried using the related field and dot walking but for some reason it did not appear to work, also by using this method i would have to create an assignment rule for each service desk location.
Would using a script be more efficient as each users geo location value is their regions service desk group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2013 09:03 PM
You could use a 'before' Business Rule. Assuming the GEO Location is a reference to the Groups table you could do the following:
current.assignment_group = current.caller_id.u_geo_location;
Is the Geo Location a reference to the Groups table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2013 10:44 AM
Perfect, this works correctly when placed in the assignment rule and is cleaner looking than the get glide.record method I had used.