We have a SuiteApp which updates NetSuite inventory item records from an external feed of distributor products, prices and availability.
This works perfectly until we encounter a site which has the Multi-Currency Vendors feature enabled.
With this feature enabled, setting the 'purchaseprice' field on the 'itemvendor' list no longer causes the purchase price to be updated (although no errors are returned).
I have tried using setLineItemValue() and using selectLineItem(), setCurrentLineItemValue(), commitLineItem() with both the purchaseprice and the vendorprices fields but cannot make this work.
How should we update the vendor purchase price on an item vendor line for an existing inventory item record, when the Multi-Currency Vendors feature is enabled?
Our code
var inventoryItem = nlapiLoadRecord('inventoryitem', 109430);
inventoryItem.selectLineItem('itemvendor', 1);
inventoryItem.setCurrentLineItemValue('itemvendor', 'purchaseprice',10.99);
inventoryItem.commitLineItem('itemvendor');
nlapiSubmitRecord(inventoryItem);
Thanks,