Creating a Document Inbound AIF Service in Microsoft Dynamics AX 2012


Application Integration Framework (AIF) services are used to communicate with external systems or applications. Microsoft Dynamics AX 2012 has the following types of services:

  1. Document services
  2. Custom services
  3. System services

An AIF service can be Inbound or Outbound. An Inbound service is used to send data to an external system while Outbound services are used to retrieve data.

This tutorial will guide you in creating Document Inbound AIF services for Microsoft Dynamics AX 2012.

Document services are XML documents that initiate transfer of data into or out of Dynamics AX. Any entity in AX can be represented as Documents, such as Customers or Sales Orders.

Document services are used when we have to execute complex CRUD (Create, Read, Update, Delete) operations on an entity.


  1. Microsoft Dynamics AX 2012
  2. AIF services must be installed and configured on IIS


As part of this tutorial, the service will return the list of Item IDs in Dynamics AX


  1. Document service uses an AOT query to generate related artifacts. For this tutorial, InventTable query will be used

  3. Open Microsoft Dynamics AX Development workspace. Go to Tools à Application Integration Framework àCreate document service

  5. This will open the AIF Document Service Wizard. Click Next to proceed

  7. In this step, specify the Document parameters. Select the Query for which service has to be created. The Document name will default to Query name. Modify it as required and give a suitable Document label as shown below. Click Next

  9. Now specify the Code generation parameters. The wizard will use this to create the respective classes. Check the required Service operations you want to be automatically created by the wizard. Click Next

    Note: To allow Update/Delete/Create Service operations, the Update property must be set to Yes


  11. In the Generate code window, review the artifacts that will be generated. Click Generate to proceed

  13. The wizard will now generate all the artifacts. In the end, a Completed screen will display the list of artifacts it created. Click Finish to exit the wizard

  15. The next step is to create a service group and deploy the service to an Inbound Port

  17. Go to Service Groups, right click on it, and select New Service Group

  19. Name it InventServiceDemoGroup

  21. Set AutoDeploy to Yes (so the service will start automatically when AOS is started) and set the Description to Item Id service

  23. Right click the newly created service group and select New Service Node Reference

  25. In the newly created service node, set the Service property to InventTableDemoService. The Name property will automatically default to the Service name

  27. Now right click the service group and select Deploy Service Group

  29. A success message will appear if the service group is successfully deployed

  31. To verify, go to System administration à Setup à Services and Application Integration Framework à Inbound ports

  33. The Service group name InventServiceDemoGroup will appear here as Port name with a green tick mark. This shows that the service group is deployed and active. If a red cross mark is present, select Activate from the action pane to activate the port

  35. The WSDL URI is the URL of the service which can be used by external systems to access the service
June 3, 2014


Email [email protected] with any questions you have pertaining to this course.

New CPE Accredited Courses Now Available for Dynamics AX, GP, and NAVEARN CREDITS TODAY