What is the difference between getField() and getV...
# suitescript
s
What is the difference between getField() and getValue() and when should I use each?
s
getField
is for getting metadata about the field, not reading the actual data sitting in it. I seldom have a need for
getField
👏 2
s
Copy code
getField
allows you to retrieve the field and do manipulations -> mandatory, hidden, disable. or reverse of those
Copy code
getValue
gets the value of whatever value the field holds. Sometimes you might need the test of what the field holds, in those cases you use getText one modifies what the field behaves, one gets what it stores, two completely different ideas!
👏 1
👍 1
s
Thanks @Sandii thanks @Sciuridae54696d