Hi all, Anyone seeing this issue with `setText` ?...
# suitescript
m
Hi all, Anyone seeing this issue with
setText
?
Copy code
You entered ... into a field where a numeric value was expected. Please go back and change this value to a number.
n
Have you checked the field type? Maybe it's Decimal or Currency etc
m
It is a list
n
I'd advise avoiding using setText on a list
this 1
m
You are mapping all lists you use?
It will just take some time.
I will try to reach out to the support.
n
if it's only happening to one list field there's probably a specific reason it's going wrong that's not obvious. You could do getField and then getSelectOptions and pull out the "value" once you've matched on "text" so you know the correct internalid to use to setValue.
m
That is clever. Will try it.
w
reminder, setText parameters are (difference is text vs. value)
{ fieldId: string, *text*: fieldValue }
not
{ fieldId: string, value: fieldValue }
n
Was always setText was value too, if it's text that's news to me. Although I don't usually do setText so 🤷‍♂️
netsuite halo 1
m
I usually don't pass an object. So it is the same.
setValue(key, value)
setText(key, value)
r
I avoid using
setText
like the plague.
💯 2
😂 1
There is always a better way using
setValue
in my experience.