- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 11:59 AM
I have an approval workflow that executes correctly until I add a Create Task item at the end. It creates a ticket in the Incident table but generates the following error:
Unique Key violation detected by database (Duplicate entry 'b9eec7c40fce4a40b2908b2022050eb5' for key 'PRIMARY')
When I remove the Create Task from the workflow it doesn't throw the unique key violation. The Create Task item in the workflow is using a template to create the Incident.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 05:53 AM
I opened an Incident with HI and got a good answer. A business rule was causing the aforementioned error. The Check for Children Resolved BR was the culprit. Disabling that BR stopped the unique key error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 12:53 PM
Yes, with no error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2015 02:13 PM
Hi Tim,
On which table you are creating the record using create task activity? If you are creating it on table "incident", you need to look for the BRs on incident table also. You might be updating the same record twice in BRs.
Also make sure you do not have any current.update() OR current.insert() in BRs or in the catalog task activity in workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2015 09:39 PM
Hi Tim,
Did you figure this one out yet?
Issues like these can be hard to track down. The error will be either very easy (dual-calls to insert() on GlideRecord within the code path), really tricky and hard to find (The call is buried 4 layers deep behind 3 Script Includes and only happens when a specific event is processed), or a platform-level bug (impossible to determine without reproducing, looking at all the source available and sometimes enabling hardcore debugging techniques).
If you don't have it solved via the suggestions here, I recommend opening an Incident in Hi so Support can start tracking down the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2015 05:53 AM
I opened an Incident with HI and got a good answer. A business rule was causing the aforementioned error. The Check for Children Resolved BR was the culprit. Disabling that BR stopped the unique key error.