I am trying to retrieve the count of "Packed" status against a sales order in SuiteScript. The code below works fine for 'quantity', but fails to get 'quantitypacked' – it just returns null. I've confirmed that the name of the field is correct. I've tried creating a custom field which sources {quantitypacked} but when I use that I get the error that '{quantitypacked} does not exist'.
var salesOrder = nlapiLoadRecord('salesorder', 1055); //load record with id 1055
var i = 3; //get row 3
var quantity = salesOrder.getLineItemValue('item', 'quantity', i);
var quantityPacked = salesOrder.getLineItemValue('item', 'item.quantitypacked', i);
This is a cached copy. Click here to see the original post.