I have some code that runs on validateLine (sublis...
# suitescript
j
I have some code that runs on validateLine (sublist of child custom record son parent customrecord). It needs to change the values on the other lines depending on the value of the line that triggered the validateLine. I don’t want the OTHER lines to also go into validateLine or else we end up in a deathloop. When I set the values on the other lines, I have
ignoreFieldChange: true
and
ignoreRecalc: true
but it’s still calling validateLine over and over and deathlooping. How can I prevent validateLine being called by a
record.selectLine
record.setCurrentSublistValue
record..commitLine
?
b
Nothing good comes from modifying other lines
You will need to write your own logic to avoid infinite loops
s
you could use
_.debounce()