SunShine
03/06/2026, 8:07 PMCeligo AI
03/06/2026, 8:07 PMAI generated answer (using internal Slack threads):To update the inventory item's vendor price using SuiteScript 2.1, you need to access the vendor price through a subrecord. The vendor price is not directly a field on the sublist, but is represented by a subrecord. Here is a sample code snippet that demonstrates how to do this:
javascript
itemRecord.selectLine({
sublistId: 'itemvendor',
line: i
});
var vendorSubrecord = itemRecord.getCurrentSublistSubrecord({
sublistId: 'itemvendor',
fieldId: 'itemvendorprice'
});
vendorSubrecord.setValue({
fieldId: 'vendorprice',
value: tradePrice
});
itemRecord.commitLine({ sublistId: 'itemvendor' });
In this code snippet, itemvendor is the sublistId for the vendor sublist, i is the line number, itemvendorprice is the fieldId for the vendor price subrecord, and tradePrice is the new price you want to set.
Please note that the price is on the itemvendorpricelines sublist, with each line representing a different currency. This is similar to the subrecord in the UI.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/06/2026, 8:07 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825622618
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824157715
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818847656
Celigo AI
03/06/2026, 8:07 PM