In a client script, I am trying to get MSRP price ...
# suitescript
b
In a client script, I am trying to get MSRP price on the item record. I've tried item.findMatrixSublistLineWithValue but I am not getting any results. sublist looks like this: price1:Array[18] 0:Object currency:"1" price_1_:"9.99" pricelevel:"1" pricelevelname:"MSRP"
b
pricing sublists are annoying to work with, send over the screenshot of what the sublist looks like
alternativly, say which of the following features are enabled in your account
Multiple Currencies Multiple Prices Quantity Pricing
b
Here is ui, yes, yes, yes but don't use
b
ouch, thats everything
b
message has been deleted
tell me about it
Been driving me crazy, especially since it was so easy in a scheduled script using 'Base Price'
I'm trying to set the declared value on field change but maybe I just update them nightly with M/R script
b
i believe you do
Copy code
Record.findSublistLineWithValue({
  sublistId: "price1",
  fieldId: "pricelevel",
  value: "1"
});
to find which line has the price level you are looking for
b
I'll give it a try, thank you for helping!
I see, then once I have the line do I call getSublistValue?
b
then use getMatrixSublistField to get the matrix field
b
ok
Thank you for your help, I was able to get the MSRP value with this
b
Copy code
var price = item.getMatrixSublistField({
  sublistId: "price1",
  fieldId: "price",
  column: 0,
  line: line
});
b
@battk I tried that but price was undefined, I was able to pull it in using .getSublistValue
b
whoops
Copy code
var price = item.getMatrixSublistValue({
  sublistId: "price1",
  fieldId: "price",
  column: 0,
  line: line
});
slightly different function name