Thursday, November 14, 2013

Odd synchronization issues in AX 2012

I have an AX 2012 R2 developer box, where I several times have installed and uninstalled a couple of different models.

Until now I have not spent much time on synchronization issues, but today I needed to solve them all for the work ahead.

And it turned out that I had a lot of issues to deal with, like the dreaded error:
"Illegal data conversion from original field xxx.yyy to xxx.zzz: unable to convert data types to anything but character field type (0 to 4)"

The odd thing that nearly drove me crazy, was that I got errors on tables that no longer exist. The synchronization form simply showed tables names that are not in the AOT, not in the ModelStore database and not in the SQLDictionary table.

As it turns out synchronization issues accumulate in the SqlSyncInfo kernel table, until fixed by the synchronization engine and they are never reconsidered. If you have old errors that were not fixed, they remain in this table even if you delete the offending table from the AOT.

So deleting the records, in SqlSyncInfo, for these obsolete tables that I no longer have in my application, fixed my issue and I could get to work on the real synchronization issues.

Remember always to take great care when messing with these system tables. One backup too many is much better than one too little.