Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
How to access item codes and purchase prices of an item?
Hi,
How can we access the item codes and purchase prices of an item via scripting if the multiple vendors feature is turned ON ?
The following code is not working.Are these fields accessible via scripting?
item_rec = nlapiLoadRecord('inventoryitem',item_id); itemvendor_count = item_rec.getLineItemCount('itemvendor'); for (var j = 1;j <= itemvendor_count ; j++) { if((item_rec.getLineItemValue('itemvendor','preferredvendor',j).toLowerCase()) == "t"); line_cost = (item_rec.getLineItemValue('itemvendor','purchaseprice',j) } Thanks,
Iby
0