Based on service Assignment group should populate by using assignment rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 02:27 AM
When we raise a case ticket , based on service assignment group should populate. For this i have written a script.
var val = '';
var itSuppGrp = new GlideRecord('sys_user_group');
itSuppGrp.addQuery('name','IT Support');
itSuppGrp.query();
if(itSuppGrp.next()){
val =itSuppGrp.sys_id;
}
if (current.business_service.support_group == ""){
current.assignment_group = val;
}
else {
current.assignment_group = current.business_service.support_group;
}
This script is working fine but if service changes assignment group should also change. But it is not working. Please provide a ASSIGNMENT RULE script for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 03:05 AM
Assignment rules won't run if the assignment group is already populated. You're going to want to do this either in an onChange client script, or an update business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 03:29 AM - edited 10-21-2024 05:00 AM
Hi Kieran Anson, Thank you...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 04:14 AM
I'm more than happy to aid in existing logic that isn't working as expected, but I'm not here to write the logic for you. Have a go at working the solution out for yourself and grow your knowledge of the NOW platform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 03:30 AM
Assignment rules only run when the field is empty, so if it is already set, they won't trigger again. You can't resolve this with an assignment rule. There are two possible solution: create a script to run onChange of the field (either a client script or a business rule) to set the correct value either client side or before the record is saved to the server. Or create a client script onChange of the service to empty the assignment group field so the assignment rule runs again when the record is saved.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark