Reassignment count field on incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 03:30 AM
Hi,
There is a field called "reassignment count" on incident table and OOB business rule associated with it to calculate the incident reassignment count. In our case this count goes up when assignment group changes before form submission.
It should start the counter when the record gets updated. User should be able to change the assignment group multiples times if needed before form submission.
Any suggestions would be greatly appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 04:47 AM
Hi @Unic0rns
First ensure that you have to change the OOTB functionality, if you really want to change the Reassignment count runs on update. Firstly Inactive or disabled the existing OOB Business Rule that increments the Reassignment Count on every Assignment Group change. Then Create a New Business Rule
- Before, Update
Script:
if (current.assignment_group.toString() !== previous.assignment_group.toString()) {
// Check if ‘previous’ is not null to ensure this is an update, not a create action
if (previous) {
// Increment the reassignment count
current.reassignment_count = current.reassignment_count.nil() ? 1 : current.reassignment_count + 1;
}
}
Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 04:58 AM
Hi @Unic0rns
I checked in my PDI and he count increased after save / update only.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 07:47 AM
Hi @Unic0rns ,
I have checked the OOTB behaviour its working fine like it doesnt increase the reassignment count untill the assignment group is changed and save the form, please check whether the OOTB functionality is modified in your instance
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang