Import CSV File: AIF method – Part 1

Continue reading

Welcome to the three part tutorial on how to import .csv file into the Microsoft Dynamics AX 2012.

Our goal is to transport data from .csv into the Microsoft Dynamics AX 2012 table. We can achieve that by using file system adapter which allows us to process non- XML files using transformation. This transformation will be done in part 2 using .NET assembly transformation which enables us to convert .csv file into XML message, that can be complied with AIF schema. In Part 3 we will show how to use File system adapter on an inbound port.

Comma Separated Values view in Notepad and AX2012.

Our goal is to transport data from .csv into the Microsoft Dynamics AX 2012 table. We can achieve that by using file system adapter which allows us to process non- XML files using transformation. This transformation will be done in part 2 using .NET assembly transformation which enables us to convert .csv file into XML message, that can be complied with AIF schema. In Part 3 we will show how to use File system adapter on an inbound port.

Now let's create service that we will later attach to the inbound port.

Firstly we need to create query for our document service:

Creating document service query.

Then we can create (in Development Workspace: Tools -> Wizards -> AIF Document Service Wizard) document service using Document Service Wizard:

AIF Document Service Wizard

Click Next

AIF Document Service Wizard

Here we select create and Generate AxBC classes. Then we click Next and Generate buttons.

If everything went right the output of the AIF Document Service Wizard should be stored in a private project under the name that we specified in DocumentName field with prefix Axd.

Axd prefixed file generated from wizard.

Select AttributeTableConfigService properties and add following namespace:

Service AttributeTableConfigService

Now when we have our Service created we need to create Service Group and deploy it. To do this follow these three steps:

Go to AOT -> Service Groups -> Right Click -> New Service Group

Drag and drop service into the service group

Right click on service group -> Deploy Service Group

Deployed Service Group.

In part 2 we will explain how to integrate Visual Studio with Microsoft Dynamics AX in order to create .NET assembly transformation.

More articles
Explore our blog

What can we do for you?

We'd love to hear about your project. Our team will get back to you within two working days.

Thank you for inquiry, we’ve passed it to our sales department, our representative will reach you back in his earliest convenience.

Oops! Something went wrong while submitting the form.
.

Dziękujemy za zapytanie, przekazaliśmy je do naszego działu sprzedaży. Nasz przedstawiciel skontaktuje się z Państwem w najbliższym możliwym terminie.

Ups! Coś poszło nie tak podczas przesyłania formularza.