I created a saved search that returns purchase order line items. What I want is to get the quantity and the quantity received using SuiteScript. The saved search has both the quantity and the quantity received on it. When I call the following code ...
var poResults = nlapiSearchRecord ('purchaseorder', 37, null, null ); for (var j=0; j < poResults.length; j++) { var qtyTotal = poResults[j].getValue('quantity'); var qtyRecv = poResults[j].getValue('quantityshiprecv'); } the qtyTotal is the same as the qtyRecv. For example, if the quantity is 20 and the quantity received is 15, then when I call this code the qtyTotal is 15 and the quantity received is 15. But if I remove the quantityshiprecv column from the saved search, qtyTotal is the correct amount (20). Has anyone else run into this issue? Thanks.