This is probably not the best solution - there is probably some way to customize the DIXF to do whatever is needed, but I don’t know how.
What I did was create my own staging table (ABCStaging_FA) in AX and use SSIS to do the ETL from the legacy system into my staging table. I then wrote custom X++ code to process the records in the staging table in order to insert or update the assets in AX.
At the bottom is the simple staging-table-processing code. The involved code is that which validats and inserts the records: that’s really long so I won’t include it here.
My staging table has an ImportStatus field. If I pass in false for _doInsertsAndUpdates then code does not insert into AX asset tables: instead, the code performs only all the validation. If there is an error, the code-specified error text is returned and used for ImportStatus. If there is no error, then “Valid” is returned and used for ImportStatus. If true is passed for _doInsertsAndUpdates, then for valid records either “Insert” or “Update” is returned and used for ImportStatus. This way, I can run SSMS queries against ImportStatus and see exactly what validation errors there are.
Note that we had 20,000+ fixed assets, and the custom process is far far faster that importing from Excel.
public void ProcessStagingTable(boolean _doInsertsAndUpdates)
while select forUpdate * FROM abcSaging_FA
row = buf2con(aaaStaging_FA);
aaaStaging_FA.ImportStatus = this.ProcessStagingRecord(row, _doInsertsAndUpdates);
throw error(‘Processing of staging table ABCStaging_FA failed.’);
info(‘Staging-table processing complete.’);