Silly question for you all. What is the expected value for a checkbox in a suitelet? It seems it doesn't like boolean. Is it "true" / "false" or "T" / "F"?
m
mattdahse
04/14/2022, 11:03 PM
It’s a little crazy. If your’e reading the value from the page in a client script running on the suitelet, it returns Boolean. If you’re attempting to set the default value when creating the form, it is “T” or “F”, and when you’re reading the value from the posted form data, it’s “T” or “F” or “” (if it was never set)
k
kwood
04/14/2022, 11:08 PM
Yeah, it was pretty easy to fix though
let checkboxValue = (paramValue == 'true')?'T':'F';
the client script returned boolean true and then the parameter converted it to a string 'true' so that's what I had to evaluate for in the suitelet
s
Shawn Talbert
04/15/2022, 1:55 AM
this is a good argument to not build UI suitelets for the most part.