Consume AX2012 R3 Salesorder AIF service from .Net, Multiple sales line and Multiple Financial Dimensions supported.


Need to add multiple sales line and financial dimensions on the sales order while creating it from AIF service in Dynamics AX2012 R3 from .Net


For adding multiple sales line and financial dimension on sales order, I created 2 List classes that will support to add multiple lines “clsSalesLineList” & “clsFinancialDimensionList” for Sales line & Financial Dimension respectively.

The following code shows how I am adding the lines in salesorder:

Creating SO

Sales Line List class “clsSalesLineList”:


it is derived from its attribute class”clsSalesLineData” which is as follow:


Similarly for financial dimensions,

Financial Dimension list class “clsFinancialDimensionList”:


attribute class “clsFinancialDimensionData”:


Now lets get on the sales order creation code,

The below screen shows the signature of the method that will takes the list classes and also how it is iterating to add the multiple lines:

Financial dimension

in the below code “order” is the object of “AxdEntity_SalesTable”:

adding sales line

in the next post I will be updating the Microsoft Dynamics AX2012 R3 AIF service to post the sales order as well.


#MicrosoftDynamicsAX2012 #AX2012 #SalesOrder #AIF #MultipleSalesLine #MultipleFinancialDimensions #AX2012R3 #.Net #Consume.NetC#


Happy Daxing with Rizz 😉

Leave a Reply

Fill in your details below or click an icon to log in:

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