Reassignment count field on incident table

Unic0rns
Tera Expert

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.

3 REPLIES 3

Deepak Shaerma
Kilo Sage

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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Unic0rns 

 

I checked in my PDI and he count increased after save / update only.

AGLearnNGrow_0-1712145526540.png

 

 

 

*************************************************************************************************************
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]

****************************************************************************************************************

swathisarang98
Giga Sage
Giga Sage

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

swathisarang98_0-1712141641090.png

swathisarang98_1-1712141676033.png

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang