How do you traverse the dom to get to this the pri...
# suitescript
k
How do you traverse the dom to get to this the price level value Slack Conversation
r
You shouldn't need to do anything with the dom. Use the API.
N/record
or
N/currentRecord
will give you
getSublistValue
to which you can send the line sublistId (price5 apparently), the line number (0), and the fieldId (sys_id).
Hang on, at first I thought you were trying to retrieve the sys_id, based on your comment below, after the picture, but that's a different number. I don't know what you're after.
k
I am trying to update the text value field on iventory item record.
@reptar
r
Which field?
If you're in the sandbox, add a weird value to the field you want to retrieve in the UI, then search for it with the field explorer. Once found you can use the instructions above.
Hmm, might be a bit more complicated than that. See @michoel’s comments from 6 years ago. https://www.reddit.com/r/Netsuite/comments/60yytt/updating_price_levels_on_item_records_via_script/ Unfortunately that help center doc appears out of date.
https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1502207768.html looks like you want to use
setMatrixSublistValue
instead of what I said.
k
Thank you @reptar
šŸ‘ 1