Hi! Is it possible in suitescript 2.0 in a client ...
# suitescript
m
Hi! Is it possible in suitescript 2.0 in a client script, eg fieldChanged, to disable fields or make them mandatory? Want it to work in both lists and on header.
b
go through the properties of currentRecord.Field or currentRecord.Column to do what you want
m
maybe I am doing something wrong like a n00b but can you see something wrong here:
Copy code
let fieldObj = rec.getField({fieldId: field})
fieldObj.isMandatory = true
(or fieldObj.isDisabled = true)
similar for sublists - sublistField.isMandatory = true
but in lists I want the specific field on the line to be mandatory or disabled, not the whole column
and does it work for drop downs?
b
Editor type sublists dont have individual fields for each column
aussie conga parrot 1
You would have to modify the entire column every time a row is selected
👍 1
m
thanks battk