Microsoft Dynamics AX 2012 Working with Data Import Export Framework

Microsoft Dynamics AX 2012 Working with Data Import Export Framework

There's a lot of effort put into an ongoing struggle to import data from legacy systems to Microsoft Dynamics AX. Since version 2012, AX introduced DMF - Data Import/Export Framework to ease the lives of data migration consultants. 

So, how does it work? I intend to show the simplest possible example using .csv files. I will not go into DMF installation (it comes as a separate installation for AX 2012 R2 with cumulative update 6 or previous versiona). You will also need to be aware that if you customize AX or create new entities you might end up with a whole lot of work more. There's more to DMF than this, but I figured, this could be a good starting point.

Prerequisite for this example to work is to create chart of accounts by clicking General Ledger -> Setup -> Chart of Accounts -> Chart of Accounts and then use Chart of Accounts form to create Chart of Accounts. This is not going to be explained here.

Let's move on to DMF. First, you need to to set parameters for working directory where the files should be stored. To do that, go to the Data import export framework from the Address bar and click Area Page node: Data import export framework -> Setup -> Data import/export framework. This will open the Data import/export framework parameters formwhere you need to at least set working directory

Here, it's set to C:\Temp. To check if the folder exists, click the Validate button. You can also set DMF to ignore errors or save them into a file, as well as max insert commit size which is the batch size that the destination server tries to commit during fast load operations (default value means all data is committed in a single batch).

With that set, you need to define source formats you're going to be using for import. This is done through Data import export framework -> Setup -> Source data formats. We are going to use CSV files:

Mind that row delimiter is set to {CR}{LF} and column delimiter to Vertical bar {|}. Also, file will contain column names (header) in the first row, so First row header is checked.

Now, we're set to go. Go to Data import export framework -> Common -> Processing group and create new processing group. Let's name it CoA and describe as Chart of Accounts import. Click the Entities button to select entities for processing group. Change Entity to 'Main account'. Change Source data format from '' to 'CSVFiles'. Tick Run business logic in insert or update method.  Tick Run business validations from.  Click the Generate source file button and the wizard will open. 

Click the Next button. Switch to the Display data tab on the Wizard form and select fields you want put in the file. Click the Generate sample file button and save the template in a designated folder. Here, that'll be 'C:\Temp\MainAccount.txt'. Click the Finish button and close the Wizard form.

An extract from the sample file is here:

Now, you should populate the file with data you want and save it to C:\Temp. Then, change Sample file path oin Select entities for processing group form, to 'C:\Temp\Main account.csv', which is the populated file.

Click the Generate source mapping button. 

Click the Close button. Click the Modify source mapping button. Switch to the Header tab on the Map source to staging form. 

Here you can view source to staging mapping. Close the Map source to staging form. Click the Validate button. An info log appears:

Close it and click the View target mapping button. Review target mapping and close the form.

If you like, you can click the Preview source file button and see what's in the file:

Close the Select entities for processing group form. Click the Get staging data button and then create job. See the sample graphic below:

Enter description if you like. and then click the OK button. You should see the following form:

Click the Run button and run insert in staging:

Now, click the OK button and close the form. You should get the info log informing you there are data in staging table(s):

Close it and click the Copy data to target button. Make sure you select the right job on this form (in our example job name should be 'CoA-1'.

The Target data execution form opens and you can click the Run button to start transfer from staging to destination. Confirm job execution on the following form.

If you got everything right, you should get info box saying you got all the accounts imported:

There it is! You can also admire your work by viewing list of accounts. Simply go to General ledger -> Common -> Main accounts.

If you have any comments or like this please share.

 

To view or add a comment, sign in

More articles by Goran Dobričić

  • When the system lies: The Curious Case of the SQL Server Management Studio Error Message

    Introduction There are few things more frustrating than following every documented step — only for the system to throw…

  • ERP Demo(n) Trap 😈

    Disclaimer: this article isn’t about pre-sales demos, but about those held during an ERP project. There are few things…

    1 Comment
  • (Why) do we need advice lists?

    Recently (better late than ever) I started enriching my mind by reading a lot of articles on entrepreneurship and…

  • A short argument on quality

    Have you ever heard the expression "This is more optimal solution."? How about "This product is of better quality"? Do…

  • How to (NOT) get killed during projects?

    How to (not) get killed during projects? Right to the point in one word: communicate. Actually, more accurate statement…

  • A leaders time to be led

    When you work with people you encounter a whole variety of different characters, different "shapes, sizes and colors"…

  • What type of person are you?

    For about ten years, my career is all about managing people. A sudden strike of luck put me in charge of an IT…

    1 Comment

Others also viewed

Explore content categories