Uncategorized

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

Requirment:

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

Solution:

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”:

SalesLineList

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

SalesLineData

Similarly for financial dimensions,

Financial Dimension list class “clsFinancialDimensionList”:

FDlist

attribute class “clsFinancialDimensionData”:

FDData

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.

Create&PostSO

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

Thanks,

Happy Daxing with Rizz 😉

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s