Home > X++ stuffs > AIF Update in Dynamics Ax

AIF Update in Dynamics Ax


Hi all,

Yesterday night I was going through the site "Discussion in Axapta Programming.” There was a question regarding AIF (Application Integration Framework).

The possibility to do updates of documents using AIF was introduced in SP2 (AX 4.0).

Let me explain you in detail
Suppose I want to use the AxdSalesOrder document to create new Sales Table entries and also to update existing sales Order, then ‘update’ action is used.


How to perform update operation on AxD:


v        Make sure that Axd<Table name> supports ‘update’ functionality.

v        Configure AIF to update <AxD> in the system. [Refer Configuring AIF]

v        Send (or) Create a valid transformed XML, so that the same could be used to ‘update’.

v Update any field value in the XML (i.e. <CustAccount>).


 <?xml version="1.0" encoding="utf-8" ?>
<SalesTable class="entity">
<!– Update Field –>
  <PurchOrderFormNum>Client PO Identifier</PurchOrderFormNum>
<SalesLine class="entity">
v Now make sure you override "allowUpdateUsingCreate" method to return ‘true’  on the AxD Class.

protected boolean allowUpdateUsingCreate()
               return true;


v Set ‘update’ to ‘Yes’ in our Axd<Table name> Query as shown below.



Note : Update should be set to ‘Yes’ for all the child datasource which are used in Axd query.


Run the Inbound job and records will be updated as required.

static void InboundProcessing(Args _args)



     new AifGatewayReceiveService().run();

     new AifInboundProcessingService().run();



Now ‘updating’ any records in AX is easierSmile

Categories: X++ stuffs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: