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

No comments:

Post a Comment

Sorting data in a form datasource in Dynamics Ax 2012 / D365F&O X++

In Microsoft Dynamics AX, you can sort a form datasource when the form is loaded. On the form, override the init method. After the call...