Simple way to extend AIF outbound data in AX 2012

Continue reading

If there is a need to extend data produced for AIF export, i.e. from tables related to the root data source of AIF query, instead of adding data source(s) to the query we can simply extend the AxABC class with additional parameters. Below is the quick guide how to do it.

Let’s assume that we need to extend standard ASN Packing Slip XML with contact name and phone. Related AIF service class is using standard query AxdASN. The root data source table is CustPackingSlipJour.

Extending standard ASN Packing Slip XML

There is related class axCustPackingSlipJour. We need just to add to this class parm methods returning wanted values: parmContactPersonName and parmContactPersonPhone.

public ContactPersonName parmContactPersonName(ContactPersonName _contactPersonName = ”)


return custPackingSlipJour.salesTable().contactPersonName();


public LogisticsElectronicAddressLocator parmContactPersonPhone(LogisticsElectronicAddressLocator _contactPersonPhone = ”)


return LogisticsElectronicAddress::findRecId(DirPerson::find(custPackingSlipJour.salesTable().ContactPerson().Party).PrimaryContactPhone).Locator;


We need to refresh AIF services to see the added parameters.

Refreshing AIF services

After refreshing changes in the related schema should be visible:

Related schema is visible

We need to enable elements in Document Data Policies in Outbound Ports:

Elements in Document Data Policies

and finally new elements should be visible in XML file:

Elements in XML file
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.