Unique Key violation detected by database while trying to insert the record in the Enhancement table
Kingston and earlier
The issue is caused due to the business rule that runs on the Approval table
There is a business rule that runs on the Approval table, which is creating a new record on the "Internal Systems Request" (custom table) table (when approval records are added from the workflow) and therefore the "sys_id" that was allocated to the "Enhancement request" record gets assigned to the "Internal Systems Request" record.
Therefore when we try to insert the "Enhancement Request" record with the same sys_id (which has been assigned to Internal systems request record), we get the "Unique key violation" error.