Notifications

39 views

Description

Customer_account import is getting lot of error when inserting a new record example - java.sql.BatchUpdateException: Duplicate entry for key account_path

Cause

Not updating the sys property (com.snc.cs_base.last.generated.code.tree.path) with correct value after importing the customer_account data
Records already exist with the provided value in the sys property (do a query on account_code with that value) Refer : Create customer and consumer information
The value in sys property (com.snc.cs_base.last.generated.code.tree.path) went out of sync with the records in customer_account

Resolution

Workaround/solution would be :

  1. Update the com.snc.cs_base.last.generated.code.tree.path sys_property with the correct value
  2. You can get the value by sorting the record list in descending order based on account_code and the first record will be the one with higher lexical order
  3. So, To get the latest code that is generated :
  4. Go to accounts
  5. Add Account Code field in the list view
  6. Sort the list in descending order based on "Account Code" Field
  7. The account code of the first record is the last generated code


* More Details :
* How new account code gets generated - account_code is generated based on the pattern "!#$&()*+,-.0123456789:;<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]`}|{~" and sys_property com.snc.cs_base.last.generated.code.tree.path
For e.g.: if value in sys_property is !!!#, the next value for account code will be !!!$.

Article Information

Last Updated:2020-06-29 01:37:48
Published:2020-06-24