axaptadynamics-ax-2012dynamics-ax-2012-r2

update number sequence in AX


I had to import data in hcmposition table. however, the positionid look like 000001 and I have used X++ to insert data into hcmpostion from an external table.

after the data is inserted, I tried to create a position form AX position form and I got the following error

Cannot create a record in Positions (HcmPosition). Position: 000001.The record already exists

in order to fix the issue I have tried to update the SYSTEMSEQUENCES table by updating the nexval field to be equal the maximum recid +1 available in hcmpositon.

however, I am still getting the same error.


Solution

  • You don't need to change nextval in the SYSTEMSEQUENCES table - it has a different purpose. Instead, try the following: