Tuesday, 2 January 2018

How to get Reserved Quantity for Sales Line in Ax 2012 x++

Follow the below steps to get the reserved quantity for sales order lines in ax 2012 x++.

If you want to get total of reserved quantity Sales line wise then you can do the following way. First you need to create view as per below picture.

Inventtrans view

Then you can try below code in job to get reserved quantity for sales line item.


        SW_InventTransView sW_InventTransView;
        SalesLine _salesline1 = SalesLine::findInventTransId('Salesllines inventtransid');

        select sum(Qty) from sW_InventTransView where sW_InventTransView.ReferenceId==_salesline1.SalesId && sW_InventTransView.ItemId==_salesline1.ItemId
                          && sW_InventTransView.InventTransId==_salesline1.InventTransId
                          && sW_InventTransView.StatusIssue == StatusIssue::ReservPhysical;
        info(strFmt("%1 Qty", -(sW_InventTransView.Qty)));

Actual Post : http://msdynamicsxx2012.blogspot.com/2017/06/how-to-get-reserved-quantity-for-sales.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TechnicalTutorialsForMsDynamicsAxapta2012+%28Technical+Tutorials+for+MS+Dynamics+Axapta+2012%29

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...