Retain the loaded record in a variable outside the...
# suitescript
j
Retain the loaded record in a variable outside the scope of the validateLine
Copy code
var rec;
function validateLine() {
  if (!rec) {
      rec = record.load({ ... });
  }
}
you'll only load the record hte first time validateLine is called