Upgrade Issues (Part 3)
31. January 2011 Leave a comment
RefRecId fields without Extended Datatype
The upgrade scripts to AX 2009 converts RefRecId fields to Int64 data types. In some cases when a <Something>RefRecId field on a table has not an extended data type but was created as integer field you get a synchronization error.
Illegal data conversion from original field TABLE.FIELDREFRECID to TABLE.FieldRefRecId: Unable to convert string data types to anything but INT, or REAL field types.
The error message doesn’t really fit to the problem
One way to deal with this issue is to copy the table content to another database. Next delete the malicious field and create a new one with RefRecId as extended datatype. AX will synchronized and delete the field on the database. Finally restore the data from the other database.
I recommend to use the SQL Server Data Import/Export wizard.
- Create a new database called Backup
- Start SQL Server Import / Export from Programs Menu
- Source DB is the Upgrade DB
- Target DB is Backup (don’t use flat files etc.)
- Copy at least on table or view, select the malicious table and run
- In AX create a new field named as the defect one but as Int64 with RefRecId data type, e.g. MyRefRecId2
- In AX delete the original field and synchronize
- Start SQL Server Import/Export from Programs Menu and copy saved data back to Upgrade DB
- At selected table or view, activate overwrite instead of append