Unique Key Violation detected by Database error in service now.

dinesh75
Kilo Contributor

Hi guys,

I have a requirement to show, only HR cases, that belongs to the logged in user's assignment group.

I have create a before business query to achieve this

find_real_file.png

This is the main code.

This is working fine as per the requirement but a problem arises when a HR case got transferred.

When the logged in user transfers the case  to some other HR service where his/her group is not in the assignment group,  we get  the following error " Unique Key Violation detected by Database error ". If I turned off the business rule there is no such error.

Can anyone kindly suggest me a better way to resolve this error and achieve the required business requirement.

 

Thanks in advance.

5 REPLIES 5

@dinesh75 were you able yo fix this? what was the resolution?


Raghav
MVP 2023