I'm changing a default sublist line quantity in ...
# suitescript
a
I'm changing a default sublist line quantity in validateLine and everything is ok, but when I move the logic to save record it will show the change but exactly the last milliseconds before save it will set it to default again. Any idea?
p
Have you got
return true
at the end?
a
Yes
b
share the code
a
I'm using select line Then Setcurrentsublistvalue Then Commitline On save record Anything wrong with that?
infact I can see the changes after I press save button till last milliseconds before save
So I think those methods are ok
b
if you want specific help, share the actual code
a
Sorry I didn't see your message
I will share it
`for(let i=0; i<l`ines; i++)`{ selectLine('item', i`)
setcurrentsublistvalue
('item', 'quantity', 5)
commitline('item')
}
return true
@battk The code inside saveRecord entry point
b
you really want to figure out how to copy and paste your code here
i cant even tell if thats ss1 or ss2
a
It's ss2
There no other way
I have to type it
b
you can try using the browser based slack
or the very low tech email yourself the file , download the file, then upload it via whichever slack app you are using
a
If I move the same loop to validateLine everything works fine
b
a
Didn't work
If I set the value manually it will stay the same but if I set it through code not
p
It's really hard to help you without you showing all of your code. We've no idea what's going on in all the different CS functions
Also, is this the only CS on the form?
z
maybe, just maybe i didn't try, problem is selectline..I would try with setsublistvalue, and you need just to add line value inside json optioms
r
There might be another script that overrides your script