Reassignment counter

sid23
Mega Contributor

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.

Script - current.reassignment_count += 1;
 
The above is acting on task table.
I want it to work as it is but, when an end user enters the details on the case form, and for an example test scenario i enter incorrect fields and try to save the case but it gives me an error saying invalid entry. So the reassignment count should remain same but its not happening. Even though the case isn't saved the reassignment count is increasing. Is there any way i can write a script saying it should only count or increase the number when the assignment group is changed and also when the case is saved?
 
 
1 ACCEPTED SOLUTION

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.

View solution in original post

9 REPLIES 9

I had changed my domain and it worked fine. Thanks for the help, will mark the answer correct now.

Also now when i fill in the correct details and when the case is saved the count doesn't increase. Any idea why? I have written the same script which you have suggested and it stopped increasing the count when the case isn't saved and gave errors, but when i enter the right fields and case is saved and i updated the count still doesn't increase.

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.

Rahul Shandily3
Giga Guru

Hi Sid,

 

Do not change anything in the OOB script. Just make the field mandatory if you can do for that field and it will work accurately.

making the field mandatory will not allow user to save the record unless it is a valid record and not crap record.

 

Best Regards,

Rahul

Please mark this as Correct/helpful if it resolved your query.

Hi Sid,

 

If it resolved yoru query, then can mark this question as correct. So that it is no longer a Question and marked as Answered.

 

If you have additional questions, please let us know.

 

Thanks,

Rahul