Import CSV File: AIF method – Part 3

Import CSV File: AIF method – Part 3

Published on
Apr 13, 2015

So far we have created and deployed Service and created the transformation, we are almost there, now we need to put this together and create inbound port.

First go to the System administration -> Setup -> Services and Application Integration Framework -> Inbound ports:

Click on New and create new inbound port, lets name it for example AttributeTableServices.

First we need to set Adapter to File system adapter and specify the URL which in our case is the folder to where you will drop your CSV files. Then click the Configure button and select Admin:

Then in Service contract customizations select Service operations and find AttributeTableConfigService.create in Remaining service operations and select it by clicking ‘<‘:

Next step is to check the Transform all request checkbox and load the dll for our transform (follow the red arrows J).

Remember that every time we modify that dll we need to change its version in Visual Studio:

Click button Activate:


First drop the CSV file into the URI directory. After execution it will disappear because it will be consumed by the service, so every time we want to test the execution we need to add a new file into the folder. Approach: Execute this following job:

static void AifProcessor(Args _args)


AifGatewayReceiveService agrs = new AifGatewayReceiveService( );

AifInboundProcessingService aip = new AifInboundProcessingService( );

AifGatewaySendService agss = new AifFatewaySendService( );

AifOutboundProcessingService aop = new AifOutboundProcessingService( ); ); ); ); );


Run job

Check AttributeTable, you should see changes!

Approach: Create batch job:

System administration -> Inquiries -> Batch jobs -> Batch jobs

  • ‍Add new batch job (Ctrl + N).
  • Click on View tasks and add new tasks (Ctrl + N) in the given above order.
  • Change status to waiting and wait for the execution.

When status changes to Ended check AttributeTable, you should see changes!

Share it
New course!

Programming in Dynamics 365 for Operations

19-23 June 2017
Wroclaw, Poland
In-depth Dynamics 365 for Operations training course is now available in Poland!
Read more →
Written by
Andrzej Lapinski

Student at the Wroclaw University of Technology. Passionate about science and technology. Main areas of interest are probability theory and machine learning. Currently I am working with X++ and Microsoft Dynamics.