- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 11:31 AM
Hello,
Right now we have an OOB business rule called "Reassignment counter". Basically it changes the number in the reassignment count when the assignment group is changed. Below is the script and condition associated to it.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 03:05 PM
Can you provide me a screenshot of what you have done?
From what I understood, you want to increase the could only when the assignment changes and record is saved successfully.
Now you have two fields. reassignment_count and case_reassignment_count.
You only want it to happen for case_reassignment_count.
So you modified the BR to be onAfter and added script
current.case_reassignment_count += 1;
current.update();
From the condition in the script, it seems that case_reassignment_count is incremented when assigned to changes.
If you want it to update for assignment group changes, you should rollback the changes you have done for case_reassignment_count and work on assignment_count
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 11:42 AM
You can change the BR to Async or onAfter and it should work fine.You will just have to add a current.update();
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 12:00 PM
I tried it for Async and onAfter but it didn't work. There is another business rule called "reassignment counter for case" and below is the script -
Condition - current.assigned_to.changes() && current.assigned_to != '' && previous.assigned_to != current.assigned_to && !(current.case_reassignment_count == 0 && previous.assigned_to == '')
Script -
onBefore(current, previous);
function onBefore(current, previous) {
current.case_reassignment_count += 1;
}
This is acting on the case. Any suggestions how i can achieve the functionality?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 12:54 PM
Ok. Change the BR to onAfter and use below script
onAfter(current, previous);
function onAfter(current, previous) {
current.case_reassignment_count += 1;
current.update();
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2018 01:12 PM
Tried doing as you've suggested but still increased.