Dynamics AX 2009 X++: Fix id in modification of application after import version control

158 Views Asked by At

How to fix ID in modification of application?

This problem will appear after changing database, and importing version control with set parameters:

  • cover by system tables and shared
  • does not search for existing records
  • index update during import

The problem is that on a few tables will show an error message:

sql database reported an error

2

There are 2 best solutions below

0
On

If you know the exact issue, you can write a job to manually fix it.

This is a more advanced task, so if you're not totally comfortable with it, I'd try Jan's approach.

ReleaseUpdateDB::changeTableId(...);
ReleaseUpdateDB::changeFieldId(...);
ReleaseUpdateDB::change* stuff

Also, Martin wrote a job that does a lot of it for you. I had to tweak it myself before:

http://dev.goshoom.net/en/2011/11/id-change/

1
On

Do a full synchronize of the database.

Beware, it may remove then reinsert fields or tables, if the id changed.