Unique Key violation detected by database When Approving

John Snow1
Kilo Expert

I am creating a simple record producer that creates a record on the task table. The workflow is simple enough it kicks off a group approval and sends notifications based on the group approval outcome. However whenever I either approve or deny a record I get the message

"Unique Key violation detected by database (Duplicate entry 'c415bf6fdb58f740f7f01ffa68961992' for key 'PRIMARY')"

The above sys-id points to the task record. I have read through a few posts which recommend checking on-before business rules for current.update() and I've had no luck. 

Any ideas on how to troubleshoot?

1 ACCEPTED SOLUTION

Harshinya1
Mega Guru

Adding to A K comments, check for an before business rule that has current.update() on approvals table

 

Hope this helps

View solution in original post

3 REPLIES 3

Alikutty A
Tera Sage

This error is usually related with recursive current.update(). Is it trying to make any inserts on task when you are approving?

One way to troubleshoot is to disable business rules on the table one by one until the error has disappeared and then identify the BR which was causing it and then analyze it further

Harshinya1
Mega Guru

Adding to A K comments, check for an before business rule that has current.update() on approvals table

 

Hope this helps

It was not a current.update() issue. Another developer had made a before business rule that caused some issues. We got it worked out. Thank you.