We were merging some item numbers in Microsoft Dynamics GP, using the Professional Services Tools Library, when we encountered a primary key violation in table IV10202.

I couldn’t find a solution in the usual places online.


I definitely do not recommend doing what follows if you have another alternative. I’ll describe a fix that worked for us, but there is no guarantee that it won’t do something bad to your database.

When I checked the IV10202 table, the primary key which was being violated was defined on just the ITEMNMBR column.

Original primary key is on the ITEMNMBR column

I temporarily modified the primary key to include the RCTSEQNM column.

Temporarily the primary key is now ITEMNMBR plus RCTSEQNM

This time when I ran the item number merge it worked. However, when I checked the IV10202 table, there were two entries for our merged item.

I deleted one of the two entries (I picked the one with the larger RCTSEQNM for no good reason).

I then changed the primary key back to just the ITEMNMBR column, and did an inventory reconcile on the merged item, which did find and fix a problem. I also ran a CHECKLINKS on the database.

This seems to have had a happy ending for us. But follow at your own risk.

Hope this helps someone.

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available