I have a question. would you recommend validateli...
# suitescript
p
I have a question. would you recommend validateline or saverecord for a client based script validation?
n
I personally use both in most of the cases.
m
There are certainly use cases for each. If you perform line level validation with
validateLine
you can give feedback to the user sooner. If you wait until
saveRecord
to validate individual lines, the user may have repeated the same mistake on every line and you've waited until they were done to let them know.
☝️ 3
p
for journal entries what would be the recommended way? with hundreds of lines
because we have multiple validations running against the journal entries I am trying to figure out what is the most efficient
b
as mike said, the answer is it depends
Given the insignificant information you shared, the answer is saveRecord. It appears you have a choice of both entry points and care about efficiency, in which case doing the validation once at the end is more efficient than doing it once per line
p
got it. thank you!