Getting error java.sql.BatchUpdateException:Duplicate entry for key account path

lucky6
Tera Contributor

Hi,

When I am inserting records through transform map or rest api explorer then I am getting this error "java.sql.BatchUpdateException:Duplicate entry for key account path.

when we insert some records in accounts table (customer_account) i have seen there is some system property which is updating the account code value every time but still I am getting this error.

Can anyone help me on this..

Thanks in advance..

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

in customer_account table are you inserting again a new record with same field value for unique field?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur, I am not inserting any duplicate values here..even with different data also I am getting the error.

Dejan
Tera Expert

Hi,

 

This usually happens after a clone. The properties do not get cloned over and if that environment has fewer accounts the system will generate an existing code tree path. Copy the value of the com.snc.cs_base.last.generated.code.tree.path System Property to the cloned environment or get the path from the last inserted customer account record and update the property.

Additional info:

Set the account code property (servicenow.com)

Importance of Account Code and Account Path for CSM Accounts - Support and Troubleshooting (servicen...

 

Hope this helps.

Dejan
Tera Expert

Hi,

 

This usually happens after a clone. The properties do not get cloned over and if that environment has fewer accounts the system will generate an existing code tree path. Copy the value of the com.snc.cs_base.last.generated.code.tree.path System Property to the cloned environment or get the path from the last inserted customer account record and update the property.

Additional info:

Set the account code property (servicenow.com)

Importance of Account Code and Account Path for CSM Accounts - Support and Troubleshooting (servicen...

 

Hope this helps.