I've added a select field beforeLoad, when insert ...
# suitescript
a
I've added a select field beforeLoad, when insert option via client script even though the isSelected is false it will select the first one. Any suggestions?
n
Add a blank option as the first option.
value: -1, text: " " OR "Please Select"
👍 1
a
So we can't fix it without addition another option?
n
Did you .trim()?
a
This solutions will change the ux
For example if you add a blank option
When user open the select field will see the first option is blank
Or please select
I'm looking for a solution without changing normal field behavior
c
Yeah you basically have to do this
Copy code
fldLocation.insertSelectOption({value: 'undefined', text: '- Select -', isSelected: true});