Hi Guys, is there a way to update lineitems field ...
# suitescript
m
Hi Guys, is there a way to update lineitems field in view mode using UserEvent Script. I tried to update the field it throws error
context.newRecord.setSublistValue({ sublistId:'expense', fieldId:'customcolumn', value:'dummy', line:0 })
s
fielded?
or fieldid, fieldId
j
What is the error and what type of User Submit operation are you using? You have limitations on updating the fields on the "new" record depending on what type it is.
👍 1
s
am i correct in saying that Muhammad's copy paste contains a typo for the second argument? should be
fieldid:'customcolumn'
j
You're right - I just wanted to account for it being a bad copy/paste.
👍 1
m
I just wanted to change the value before page load
Syntax is not an issue, i have fixed that, do you think it should worked and should display changed value?
b
beforeLoad is not the entry point you want to use to change values
at best, you use it to add default values to fields