/
Saving a new record reports a duplicate key error
Saving a new record reports a duplicate key error
Problem
On rare occasions, saving a new record e.g. sales order, quote, purchase order etc. will report a duplicate key row error on the related table - e.g. "Duplicate key row in object dbo.QO_Main with unique index QO_MainInvoiceNo".
Solution
All numbering for records in the database is controlled by the form System Numbers found in the System Settings menu. The issue is caused by the relevant record in the table SY_Numbers not being updated
System Settings > System Numbers
Locate the relevant record e.g. QuoteNo if the issue is with Quotes
Increase the value by 1
Save the changes
New quotes will now save as expected
Related articles
, multiple selections available,
Related content
Cannot insert duplicate key row in object ....
Cannot insert duplicate key row in object ....
More like this
Error logging in to a newly upgraded database - duplicate key value supplied
Error logging in to a newly upgraded database - duplicate key value supplied
More like this
Saving changes to permissions in the sales order form errors 'Cannot insert duplicate key row ...SY_UserGroupPermissions...'
Saving changes to permissions in the sales order form errors 'Cannot insert duplicate key row ...SY_UserGroupPermissions...'
More like this
Error when opening sales order 'The added or subtracted value results in an unrepresentable date/time
Error when opening sales order 'The added or subtracted value results in an unrepresentable date/time
More like this
Copying a quote and changing the debtor before saving did not ask if prices were to be re-calculated
Copying a quote and changing the debtor before saving did not ask if prices were to be re-calculated
More like this
Purchase Order Line Not Found when opening GRN
Purchase Order Line Not Found when opening GRN
More like this