I am working with a client who is trying to combine several accounts into one using Account Modifier/Combiner in the Professional Services Tools Library (PSTL). During the combine operation, we receive the following error 'Violation of PRIMARY KEY constraint 'PKREC10000'. Cannot insert duplicate key in object 'dbo.REC10000'. The duplicate Key is (3,50). After querying the REC10000 table, which exists at the company level, I found ACTINDX 3 and 50 matched the index of accounts we were trying to combine several other accounts into. The original accounts also existed in the REC10000 table, so it appears as though every time one of the accounts is combined into the existing account, PSTL tries to insert another record into this table, violating the primary key.
My instinct is to remove the original ACTINDX entries - 3 and 50, and all but one of the accounts we want to combine from the REC100000 table. So PSTL will modify/combine the one remaining account record in this table to the desired final index values (3 and 50) without violating the Primary Key Constraint.
Does anyone have a better suggestion?
*This post is locked for comments
I was able to test remove the original ACTINDX entries for all but one of the accounts, prior to running the combine process again - IT worked! It is important to remove the various accounts being merged (changes did not produce the same error). Example:
Accts
1101
1102
1103
Merge 1101, 1102 and 1103 into 1100
All accounts had previously been assigned to this table for selection as possible cost accounts for transactions entered by custom cost account selection interface.
When GP converts 1101 to 1100, no problem, but when it combines 1101, 1102 and 1103 into 1100, the result is inserting multiple records with the same value into the REC10000 table.
Hi
There was a similar issue a couple of weeks back with a different table. It looks like there may be issues when there is a third party product that might rely on the Account Master information (which is understandable if they have triggers against the Account Master table to add new accounts into their table).
I agree with Leslie about solution - you probably just need to be sure of what that table does for whichever product it relates to. Chances are, because you are combing, it is not going to be an issue but there may be processes that rely on that table within the third party product that won't pick up the changes effectively.
Best way to find out what it relates too would be to look through the resource descriptions for the add-on products that you have. (Tools --> Resource Descriptions --> Tables).
Once you have isolated what it relates too, it may be worth raising the issue with the provider of that product so they can maybe include a fix for it in a later release.
Could be good to add which product it does relate to to this thread so that if others are looking it is a bit less of a needle in a haystack.
Cheers
Heather
Hi Harry,
While I am not familiar with the REC10000 table, I've had this problem with a different table using the PSTL tool to combine/change things. My solution is to do exactly what you suggested. I delete the record that was already there so that I can add mine. If you don't want to lose the data (in case you need it later), you can just change it such that the indexes no longer match. I don't know if you need the data for anything. But, the only way to clear a primary key error is to get rid of the matching primary key.
Kind regards,
Leslie
Please have a look on the below link.
Hope this helps!!!
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156