Hi all,
We are migrating legacy tables that exist in AXDB but were never created through the AOT. We created AOT definitions for these tables and triggered sync — but sync kept failing because the table already existed in SQL.
Temporary Solution
We renamed the legacy table so D365 could create it fresh:sql
EXEC sp_rename 'SFD10001', 'SFD10001_OLD'
SFD10001.The New Problem — Data Restoration
When we tried restoring data from the old table back into the new one:sql
INSERT INTO SFD10001 (...) SELECT (...) FROM SFD10001_OLD
It failed because the old table had nullable values in several columns, but D365 creates all columns as NOT NULL — even when Mandatory = No is set in AOT. D365 does not support nullable columns at all; instead it substitutes default values (0, '', 1900-01-01) for empty fields.
So any NULL values in the old table have no direct equivalent in the new D365-managed table.
Has anyone dealt with this data restoration challenge? How did you handle NULL values when migrating legacy data into AOT-managed tables?

Report
All responses (
Answers (