SunShine
03/06/2026, 8:00 PMCeligo AI
03/06/2026, 8:01 PMAI generated answer (using internal Slack threads):To update the inventory item's vendor price using SuiteScript 2.1, you can use the
setCurrentSublistValue method on the 'itemvendor' sublist. Here is a sample code snippet:
javascript
// Assume that theRecord is a loaded or created item record
theRecord.selectNewLine({ sublistId: 'itemvendor' });
// Set the sublist values...
theRecord.setCurrentSublistValue({
sublistId: 'itemvendor',
fieldId: 'vendor',
value: 1234 // replace with your vendor internal id
});
theRecord.setCurrentSublistValue({
sublistId: 'itemvendor',
fieldId: 'purchaseprice',
value: 123.45 // replace with your vendor price
});
theRecord.setCurrentSublistValue({
sublistId: 'itemvendor',
fieldId: 'preferredvendor',
value: true
});
// Commit the sublist line.
theRecord.commitLine({ sublistId: 'itemvendor' });
This code first selects a new line in the 'itemvendor' sublist. Then it sets the 'vendor', 'purchaseprice', and 'preferredvendor' fields. Finally, it commits the line to the sublist.
Please replace the 'vendor' and 'purchaseprice' values with your actual vendor internal id and vendor price.
******
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:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817321837
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813842833
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81137085
Celigo AI
03/06/2026, 8:01 PM