use a string value to set the ID it'll work
# suitescript
c
use a string value to set the ID it'll work
t
can you elaborate?
c
says you have entered an invalid value 3940.0
use '3940'
t
no my screenshot is showing me GETTING the value which is 3940.0
c
field must be setup funny
you can still typecast to a String what you get back and itll be fine
t
Right but its a bundle and its only happening this way in 1 account out of like 4 i've checked
This account doesn't show a .0 in it
e
Just
parseInt
your retrieval
t
yeah I think thats my solution
But i'm curious why this is happening.
e
Strange behaviour, to be sure
not something I've seen
t
if netsuite puts a comma in there for any reason that solution could break too
b
for some reason, sometimes serverside suitescript Numbers are converted to strings with 1 decimal place
the general recommendation is to set fields using strings and not numbers
my guess is that your bundles sets that field using a number instead of a string
t
so i grab that value from the sublist and then try to use that same value to set a list / record field in a custom record later and it fails
You can see here that string or number works but the ".0" messes everything up for my list / record field
c
Thats exactly what happens @battk. Its reproduceable as well as I just ran into this. If you try to use a number, it will convert to a decimal number (not string) .0. So I just made sure everything was a string and it was fine.