How to find position in file according to the import warning line?

I have export .xpo file with lots of tables in it. The tables exists in the system. When I try to import that .xpo by command import I get some of

Warning Message (09:31:48 am) Import warning (line 510) skipping property Validate.

warnings. It looks like the line number do not correspond to the line in file. How do I find which table(s) this error(s) are related to?

Hi,

In AX, export files are xml files with xpo extension, you can open xpo files with a text editor, then you go to line 510 and you’ll see which node of which table causes troubles

Hope it helps

regards,

Thomas

The property Validate is not near line 510 in .xpo file when I open it in text editor.

I’m not sure the validate word in your message refers to a table validate() method, anyway your problem seems to be located near line 510. what does your line refers to? code node? field node? property node?

regards,

Thomas

Validate refers to the table relation property Validate.

In the .xpo file near line 510 are the table fields.

So it seems clear, you have problems with your table relations, I can’t tell if it will solve your problem but you can try to modify the validate property to see if you have the warning message. You should have a look at your table data relation definitions, if AX raise a warning, you might have problems with data consistency

Have a look at the following link: http://msdn.microsoft.com/en-us/library/hh803130.aspx

hope it helps

regards,

Thomas

There are hundred of tables in the .xpo file with like 350 relations. I have this warning on 6 times. I am trying to find a tables (1-6 from 100+) where I should change that.

You should split your xpo and try to export piece by piece to isolate tables that causes troubles

If some of your tables are existing on your target environment, you should use the comparaison utility in AX import tool, it will show you exactly where’s your problem

No. The line number was not helping at all.

I found 2 solutions how to deal with this.

  1. „I tried to reproduce the issue and check %USERPROFILE%\Microsoft\Dynamics Ax\Log*Import.log as per Matej’s advice but its size was 0 so it didn’t help.

The stack trace when the warning is thrown looks as follows:

\Classes\Info\add

\Classes\xInfo\importElement

\Classes\SysImportElements\importElements 38

\Classes\SysImportElements\import 46

\Forms\SysImportDialog\Methods\import 30

\Forms\SysImportDialog\Designs\DesignList\Import\Methods\Clicked 3

You can set a breakpoint in \Classes\Info\add and when a warning is displayed check the value of tmpImportAot.TreeNodeName in the debugger in \Classes\SysImportElements\importElements - it will contain the name of the table.“

  1. „I find a second way how to solve this. I export tables I imported by this file and compare what I was importing with want was exported from that import and I find a difference which leads to problems.“

http://stackoverflow.com/questions/26648902/how-to-find-position-in-file-according-to-the-import-warning-line