Nour Khaled
01/23/2025, 11:53 AMCeligo AI
01/23/2025, 11:53 AMAI generated answer (using internal Slack threads):To get the price from the 'price1' sublist in a lot inventory item, you can use the
getSublistValue
or getMatrixSublistValue
method in SuiteScript. Here is an example of how you can do this:
javascript
var price = itemRecord.getSublistValue({
sublistId: 'price1',
fieldId: 'price_1_',
line: 0
});
Alternatively, you can use the findSublistLineWithValue
method to find which line has the price level you are looking for, and then use getMatrixSublistValue
to get the matrix field:
javascript
var line = itemRecord.findSublistLineWithValue({
sublistId: 'price1',
fieldId: 'pricelevel',
value: '1'
});
var price = itemRecord.getMatrixSublistValue({
sublistId: 'price1',
fieldId: 'price',
column: 0,
line: line
});
Please note that working with pricing sublists can be complex, especially if you have multiple currencies, multiple prices, or quantity pricing enabled in your account. It might be easier to do an item search with a column for the base price instead.
******
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
01/23/2025, 11:53 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814828157
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808637381
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807111442
Celigo AI
01/23/2025, 11:53 AM