have anyone experience setSublistValue is not a fu...
# suitescript
t
have anyone experience setSublistValue is not a function error?
b
the guess will be that whatever you are calling setSublistValue on is not a standard record
t
we found the solution it seems that the isDynamic must be set to False when using this 🙂
t
Your record object is probably in dynamic mode
👍 1
t
@tech_ph2019 yeah you're correct.. we set it to false eventually
s
in a client script, you can use both 'current' mode apis and standard
n
@stalbert how can you do that?
s
by using both types of functions in the script e.g.
getCurrentSublistValue
and
getSublistValue
. I had to do this recently so that I could iterate over existing lines (via getSublistValue) while also working with the 'current' line.
the NS docs clearly state that
getSublistValue
is available in both dynamic and standard modes, no?
n
getSublistValue may work, but to set sublist value, we need to select line, setCurrentSublistValue, then commitline. I am sure about this because this has recently impacted the performance on a Suitelet I used it for.
s
what do you mean by 'performance' - are you suggesting that setSublistValue was slower than selecting a line, setting a value, committing a line? Or do you mean you tested and setSublistValue simply didn't work?
n
I meant that I tested setSublistValue and it didn't work. Then I had to use select line, set value, commit line - which took a bit longer.
s
ah, makes sense.