I'm selecting a new line and setting an item on a ...
# suitescript
j
I'm selecting a new line and setting an item on a sales order after another line gets committed, I start this process in the sublist changed method but it looks like the item is being unset for some reason, anyone know how to fix this?
b
im guessing you are committing the new line before the item has finished sourcing
set forceSyncSourcing or fireSlavingSync to true on the options for setCurrentSublistValue
j
I think I had to wait until the previous line was committed properly, I added a setTimeout with 0 milliseconds on my function and it seemed to work now
a
oh wow, i have never had to use timeouts... curious if you were trying to use some type of async/promise version of the functions...