Sage 100 Premium 2021 or later error converting AP_Checkhistoryheader "duplicate key"

Description

In Premium Sage 100 2021 or later, failing when converting existing older data that was migrated to the new install of Sage 100 Premium.

Full error reads:

The following conversion record failed while converting XXX:\07.00.00.00:DATA:CI_BankCodeListWrk:000001:000 - Error converting AP_CheckHistoryHeader at record...
Operating system command failed. OS Error:23000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'KPRIMARY_AP_CheckHistoryHeader_1925550220'. Cannot insert duplicate key in object 'dbo.AP_CheckHistoryHeader_1925550220'.
The diplicate key value is (C, 0000053941, 000000).
Error converting AP_CheckHistoryDetail at record G004233 00000000030333191 00000. The error was Error #15: Operating System command failed.
OS Error: 23000:[Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint
'KPRIMARY_AP_CheckHistoryDetail_1925670220'. Cannot insert duplicate key in object 'dbo.AP_CheckHistoryDetail_1925670220.' The duplicate key value is (C, 0000054090, 00000, CK54090, 00000)
View the Activity Log to locate a specific conversion log.

Cause

As the Check No field in AP_CheckHistoryHeader and AP_CheckHistoryDetail was expanded in 2021 version of Sage 100, the conversion is failing when it finds two values in old data (migrated over) that would convert to the same value in the expanded field.

For example, check no 054090 & 54090 when expanded would both be 0000054090 (padded with leading zeroes).

This is not the same as Related Resources which are due to a Comma or Decimal point in the Check No field.

Resolution

This is a data issue with 2 Check Number (Check No) values that are similar but in the expanded field would equal the same value and violates Premium restriction for duplicate key on the table.

The original values must be modified in SQL to allow for 2 unique records when expanded. Both the AP_CheckHistoryHeader and AP_CheckHistoryDetail records would need to be modified for the problem record(s)

  • Contact Sage Support for Program fix for CheckNo's beginning with 'APP' in Sage 100 2021.0 - 2021.3

Solution Properties

Solution ID
230726164235177
Last Modified Date
Wed Jun 19 22:35:09 UTC 2024
Views
0