Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Error:- "Unique Key violation detected by database (Duplicate entry 'TASK0020070' for key 'task_U1')" is shown when user accesses chat queue to send the message to generate incident. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Error:- "Unique Key violation detected by database (Duplicate entry 'TASK0020070' for key 'task_U1')" is shown when user accesses chat queue to send the message to generate incident.
KB0687017

Error:- "Unique Key violation detected by database (Duplicate entry 'TASK0020070' for key 'task_U1')" is shown when user accesses chat queue to send the message to generate incident.


23113 Views Last updated : Jan 17, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

Chat users are unable to create an incident from the chat.

Steps:

  1. Enabled the below-listed plugins
    • Connect
    • Connect Support
    • Connect Support and Service Portal Integration
  2. End-user initiates chat using Service Portal.
  3. https://<instance>.service-now.com/$chat_support.do?queueID=b8d808c50fb1be00df6e1efae1050eed
  4. Error displayed:
"Unique Key violation detected by the database (Duplicate entry 'TASK0020070' for key 'task_U1')".

Release

Any ServiceNow Release using Connect Chat

Cause

In the customer instance, they had enforced uniqueness on the Task table "Number" field. 
 
From the documentation regarding the unique option: 
 
Note: While unique indexes ensure data integrity they also prevent any insert involving a duplicate number. This may cause unexpected errors during data entry." 
 
The chat_queue_entry number is inherited from Task. Baseline instances do not have this field flagged, so the default numbering is not an issue. 
In out of the box instance,  'Number' field is not set to 'Unique' in Task Table.
 
The customer did not have Auto numbering defined on chat_queue_entry[ Table: Chat queue entry]. 
In a standard out-of-the-box instance, this is the default behavior.

Resolution

  1. Remove the enforced uniqueness on the task Number field to resolve the issue.
  2. Add a reference for chat into Number Maintenance on chat_queue_entry [ Table: Chat queue entry]
For example:
  1. Go to System Definition > Number Maintenance
  2. https://<instance>.service-now.com/sys_number_list.do?sysparm_query=
  3. Click New.
  4. Table: Chat Queue Entry
  5. Prefix: CHAT
  6. Number: 10,000
  7. Number of Digits: 7

Related Links

Auto-numbering records in a table


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.