Does anybody know if I can get the `onlineprice` o...
# suitescript
j
Does anybody know if I can get the
onlineprice
of an item directly without having to loop through the pricing sublist? I’ve tried
record.getValue({ fieldId: 'onlineprice' });
but no dice.
m
This depends on whether you have multi-currency enabled. Without multi-currency.
Copy code
item_record_standard_mode.getMatrixSublistValue({
    sublistId: "price",
    fieldId: "price",
    column: 0,
    line: 5,
});
With multi-currency. The number following
price
like
price1
will represent the currency id.
Copy code
item_record_standard_mode.getMatrixSublistValue({
    sublistId: "price1",
    fieldId: "price",
    column: 0,
    line: 5,
});
j
Is online price always line 5, though?
@Marvin
m
Not going to guarantee that...but it has been so far for me.
j
It seems like I can’t even get the
pricelevelname
to check and see if it’s the “Online Price”… 😠
m
I use the Firefox extension Netsuite Toolbox to look at the records.
b
expect to understand the Pricing Sublist / Pricing Matrix before getting very far
as you expect, the online price isnt always on the 6th line