Hi everybody, I have a script in the Sales Order ...
# suitescript
r
Hi everybody, I have a script in the Sales Order that is being triggered on validateLine(), and it works fine when you enter the lines manually. However, if you enter multiple lines by means of the button above the sublist called "Add Multiple", it does not trigger any of the scripts in validateLine() and therefore the lines are added without some logic that I have being executed. Has anyone encounter it before? Any solutions to it? I have only found this reference so far, and it does not help much --> https://stackoverflow.com/questions/48011996/client-script-not-triggering-when-using-add-multiple-button-on-sales-order-su The reply is referring to some recalc event that I guess it might be present in 1.0. Is not present on SuiteScript 2.0.
b
recalc is the old name for the sublistChanged entry point
which is your only choice to do any suitescript that works with the Add Multiple button. all the other entry points wont trigger
my vote would be to unset
Allow Add Multiple
on the custom form (the help for that field will give you more information about its effect on line validation)
r
Thank you @battk and @Sandii for your replies. I will check the possibilities around sublistChanged entry point. But indeed, I might as well just uncheck the "Allow add Multiple " on the custom form.