Set the checkox 'u_resolution' to 'true' if the incident assignment group is same from beginning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
1.I have a requirement to set the Checkbox 'u_resolution' to set to true. If the assignment group field of the incident record remains unchanged from the beginning to end of an incident.
2. If the incident is assigned to Assignment group ' IT support' in the beginning and then the assignment group is set to 'Help Desk' and then at later point of time it is assigned to 'IT Support' again even at this point it has to set to checkbox 'u_resolution' to true
can anyone help with this!
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@Trupti Krishnam , well you can create a new field on the incident form, keep it hidden.
You can make use of that field to store the assignment group only once. Do not update this field everytime the assignment group is changed.
Later, you when the incident is resolved, you can compare the new field's value with the assignment group value and based on that you can mark the check box.
If my response has helped you, kindly mark it as helpful and accept the solution.
Regards,
Nayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Here are the steps -
Create a new field on the incident table for.eg. Initial Assignment Group (keep it hidden)
Write a business Rule - Before Insert/Update
Condition - Assignment Group Changes and Initial Assignment Group is empty.
// Before Insert/Update Business Rule
(function executeRule(current, previous /*null when async*/) {
// Check if the destination field is empty and the assignment group is not empty
if (current.assignment_group && current.u_initial_group.nil()) {
// Set the custom field to the value of the Assignment Group
current.u_initial_group = current.assignment_group;
}
})(current, previous);Similarly , you can write another business rule after the incident state is Resolved.
You can verify if the current.assignment_group == current.u_initial_group then you can mark the 'u_resolution' as true.
If my response has helped you, kindly mark it as helpful and accept the solution.
Regards,
Nayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
you will require a custom field to handle this
1) field referring to sys_user_group table
2) Before update BR to store that
(function executeRule(current, previous /*null when async*/) {
// Capture the assignment group set at creation (even if defaulted by UI Policy)
if (!current.assignment_group.nil()) {
current.u_original_assignment_group = current.assignment_group;
}
})(current, previous);
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
43m ago
Create a business Rule when a incident state chage to Resolve,
In advance script ,
1. Check incident_metric table for that incident , if 1 record exist (against definition = Assignment group), then set u_resolution =true //assignment group field of the incident record remains unchanged from the beginning to end of an incident.
2. If more than than one entry is there , put logic in code , that if 1st and last is same then u_resolution =true.
e.g first assigned INC to Network E assignment group
Netscout S group
Network E assignment group //"End" field empty means it was assigned during resolve
