Data Import/Export Framework Walkthrough: Importing data

Microsoft AX Data Import/Export Framework, out of the box supports 70 Entities types. In this post I will perform an import of customer data. The same concept is also applicable to other entities types.

Configuration

You must setup a folder with the purpose of sharing data between AOS Service and SQL SSIS.

Open “Data Import/Export Framework > Setup > Data Import/Export Framework parameters”

Screenshot01

Select a folder and press validate.

If the folder exists and has the proper permissions the icon should change to green.  AOS Services and SQL SSIS must have access permissions to this folder.

Data Source Formats

Open “Data Import/Export Framework > Setup > Source Data Formats”

Where possible I prefer using a file format that allows manipulating data directly in Microsoft Excel.

Screenshot02

  1. Create a new record.
  2. In source name, named it “TXT.
  3. Select a description that defines the data format.
  4. The files will be TAB separated values to easily manipulate it in Microsoft Excel. I have selected the option Delimited in File format and Row Delimiter type “Tab {t}”.
  5. I prefer using column names in the first line, so I have selected the “First row
    header” option.

Processing Group

Open “Data Import/Export Framework > Common > Processing Group” and select new. I only want a processing group that will import Customers, so I have named it Customers.

Select Entities option

Capture8

  1. Click New
  2. In the entity Name select “Customers”
  3. In the Source Format, select previous format, TXT file.
  4. Select “Run Business Logic in insert or update method” and “Run business Validation”

Select the option “Generated Source File”

Screenshot05.0

Press Next

Screenshot05.1

Select the fields you would like to import. To work with the proper template file, select “Generate Template”.

Capture9

Now, open the template in Microsoft Excel and fill your data.

Screenshot07

Close Excel, and select the text file in sample data.

19

Click Modify Mapping to validate the mappings and you can amend incorrect configuration

12

Select “Mappings to details” to map data using a tabular method.

Screenshot08

I have chosen the “Auto-generated option” because I want customers numbers being assigned automatically by Microsoft AX.  Confirm if everything is correct and close window.

Press “Preview Source file”

Screenshot08.1

Close “Entities Processing group window” and select “Get Staging Date” in the list of processing group.

Screenshot10

Create a new job.

Screenshot11

Select run.

Screenshot12

Press Ok.

Screenshot13

A log message is displayed.

Now, select “Copy data to Target”, to move the information from the staging area into final entities tables.

25

Select the job that was created in first step to import data into staging area and ok.

Capture10

Run the job.

Capture11

Data Validation

Open Accounts receivable > Common > Customers >All customers and filter, customers using the data in Excel.

30

Open the customer and validate the imported data.

31

Data Import/Export Framework Walkthrough: Installation

Microsoft provided an extension to Microsoft Dynamics AX that smooth’s the import / export process. Without this framework, importing data to some specific tables implied using X++.

I will try to publish a series of posts about Dynamics AX Data Import/Export Framework, covering:

  1. Installation
  2. Architecture
  3. Importing data to an out of the box target entity
  4. Importing to a custom target entity

Installation Step by Step

1 – First you must download the extension package from informationsource, unzipt it and execute setup.

2 – The installation process is split into 3 main components :

  • A component must be installed on a server running MS SQL Integration Services.
  • A component must be installed on a server running AOT.
  • A component must be installed on a workstation having the Dynamics AX client

Since I’m running all the services on a single box in a virtual machine, I have selected all components.

Install

In first step of the wizard, the installer will check if you have the minimal requirements.

Capture4

Designate a user account to run the Data Import/Export Framework service. Enter the user account of AOS service.

Capture5

Press Next.

3 – The components are now installed, now the model files must be imported into Dynamics AX

Import the Model file from a command line using AXUTIL. The modal file is located inside the folder of the client component.

Note that there is a matching folder in “C:\Program Files\ Microsoft Dynamics AX 2012 Data Import Export Framework Client Component” for each supported version of Dynamics AX.

  • AX 2012 -> Folder 2012.
  • AX 2012 Feature Pack ->  Folder 2012 FP.
  • AX 2012 R2 -> Folder 2012 R2.

For Dynamics AX 2012 R2 execute : axutil import /file: “C:\Program Files\ Microsoft Dynamics AX 2012 Data Import Export Framework Client Component \2012 R2\model\DataImportExportFramework.axmodel”

Capture7

Capture8

4 – Restart the AOS service

Capture6

5 –  Open the Dynamics AX Client, and a screen should popup to you. Select “Compile and synchronize” option. The next step is to do a full CIL compile.

Capture9

This step should take a few minutes to complete.A info log is displayed at the end.

Capture10

6 – Restart the AOS Service

Capture6

7 – Open Dynamics AX client, now the Dynamics AX Navigation pane should have the option of Data Import/Export Framework.

Capture11

Stay tuned for next posts