Hi,
I'm am using multi-location inventory and I want to access quantity on hand, quantity available, quantity backordered, etc. for an item. I do have MLI on and working. Basically, I want to pull in some item (like an inventory item or assembly item) and then access the quantity on hand/quantity available/etc. for each location on that item. I have the following code:
var item = nlapiLoadRecord('inventoryitem', itemId); var locationscount = item.getLineItemCount('locations'); for (var i=1; i<= locationscount; i++) { alert(item.getLineItemValue('locations', 'quantitybackordered', i)); } But the alert simply returns a null value. I know that locations exist for this item because I can call item.getLineItemCount('locations') and it returns the correct number of locations. I pulled up the source for the page and it looks like 'quantitybackordered' should be the correct field name but it doesn't work. Does anyone have any idea on how to get this to work? Any help would be appreciated. Thanks.