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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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