Hello everyone, so I want to conditionally cancel ...
# suitescript
l
Hello everyone, so I want to conditionally cancel selection of specific option in drop-down field on a record. I have all the checks ready and was under impression that you just need to
return false
on
fieldChanged()
entry point to revert drop-down value to the one before change. That doesn't seem to be working though or am I missing something?
b
that said pay extra close attention to the notes in validate field regarding select fields
l
okay, so back to square one - I'm still using
fieldChanged()
, should it work like I said or do I need to manually pull field value to some global variable on pageInit, and then us it to revert drop-down state?
b
go through the docs on fieldChanged to see if it does anything with the return value
l
yeah it doesn't, but thanks
So for future reference - after a check in
fieldChanged()
I do
lookupFields()
on current record id and use returned value to reset drop-down select to it's initial state.
s
fieldChanged is a void return type, it is not a validation entry point
👍 1