Difference between conversion and import criteria tab in definition group

Hello everyone!

I have a follow up question on my previous post on how to import…

In creating a definition group, what is the purpose of the conversion tab? is it different with the import criteria? can I use the same script for conversion and import criteria?

One more thing, once I created an excel file using the template wizard can I overwrite it (input additional data), and then import it back using the same definition group? I tried doing that but it doesn’t seem to work. do I have to put something on the conversion tab? or import criteria, maybe?

thanks for those who would help!

regards,

Haydee

will the script i put in the conversion tab also work in the import criteria?

Both tabs can be used similarly, but the “Conversion tab” is used to manipulate data before it is inserted, and the “Import criteria” tab is used to determine IF it should be inserted, from my understanding.

Alright Alex.

If I fill in those two tabs, do I have to do something in the AOT?

Well you need to know what you’re doing before you do data imports. You need to explain what you want to dump into AX to a technical person, and have them investigate how to best go about doing it. If you don’t know how the underlying table structure works completely, then how can you import data into it?

If you’re doing this in a live environment, it’s very easy to dump bad data in…

The two tabs are meant for developers to place needed code. Nothing should really need to be done in the AOT. The only time somebody with a functional background should import data is once they’ve been shown a good method to do so, otherwise, they risk polluting the environment with bad data.

You can export data, add data to it, then reimport, but that will not always work. Say for example you export the InventTable, add a few items, and then reimport the InventTable file. This will dump data in that table successfully, and you will see it in the AOT, but you won’t see it in the Item Details form because the relating tables don’t have the required data.

Hi Alex!

ahhh… ok I understand. Apparently, our developers and technical do not know much about this yet. That’s why I am still trying to figure everything out. Please bear with me.

That is what exactly is happening, I import data (the infolog says that the importation was successful) but when I go to the details, it is empty. However, when I input a script in either the conversion or import criteria tab, the table lines have data! But when I right click, go to the main table on, lets say, the vendor group in vendor details, it is empty although in the vendor details the data is there.

I was thinking that if I modify something in the AOT, it would insert table that I need.

Thanks for explaining…appreciate it!

haydee

…or can i just put the script in the conversion tab/import critera?

Try by running Consistency Check from Basic module to know the problems in your data which you have Imported.

That depends on the content of the Script.

Haydee

Tell us the import you are running and the tables you are populating, then tell us the content of the script.

Basically you are not populating the tables, the script may do this, but it depends.

im trying to import vendor table.

here’s the script i put on the conversion tab:

str dirId;

;

// Check that the vendtable table is not associated to Party.

if (!vendTable.PartyId || vendTable.PartyId == “”)

{

// Create a Party entry for the vendor.

dirId = DirParty::createPartyFromCommon(vendTable).PartyId;

vendTable.PartyId = dirId;

}

else

{

DirParty::updatePartyFromCommonInsert(vendTable.PartyId,vendTable);

}

when i put this script, the importation is successful.

I have no background in x++, so please bar with me.

:slight_smile:

The basic thing here is - AddressBookId is mandatory for creating vendor.

So what the above code will do is - it will create a book Id and which will be inserted in to the vendor table.

Then what is your problem???

Hi kranthi,

where can I run the consistency check in the Basic Module?

Hi Kranthi, my problem is that the Address is empty.

Run it from - Basic → Periodic, Select vendors and click execute…

Hi Haydee

I cannot really offer support throuhg the private message, if it is on the forum future users may benefit.

Basically consider everything

Static Data; Customers, Vendors, Items, BOM’s Routes, Contacts, Business Relations etc etc. The relationships are obvious, you need a customer record before importing alternate addresses.

Then you have dynamic data, opening balances (GL/AR/AP), opening stock, open purchase orders, opens sales orders, open production orders. How do you handle WIP/GRNI/GSNI. You need items, customers, COA etc prior to any of this. Then there is history and what you do with that (avoid it)

The table order depends upon the requirements. The “field” requirements you talk about depends upon the project, the customer data and the requirements of the customer.

Then you need to consider methods, how the data is presented to you, the timescales, the data verification etc.

Each business will have different approaches and methodology.

Data Import and Export tools are basic, they have issues and on the whole are not recommended for the more complex migrations, which in AX2009 could arguably include customers and vendors, as well as items. The business I work for do not use them for data migration projects, scripts are used because of the greater control, greater validation and overall time saving trying to resolve what the Excel import has done, but that is just a policy, whay you do is up to you.

You have encountered lots of issues already and if you are going to do this with no development input then it is going to be very long and painful for you and your customer (sorry).

Ok Adam. Thanks a lot. we already acquired support from Microsoft. And regarding the script, we’re still figuring it out. Don’t be sorry it will be fine. we can solve this problem soon . we just have to work hard.

super thanks!

haydee

What are steps you have followed for the migration???