When doing `sublist.commitLine('item')` , is there...
# suitescript
c
When doing
sublist.commitLine('item')
, is there a way to stop
validateLine
event from firing?
s
Are you doing this within ClientScript?
c
Yes
s
Is the validateLine entrypoint defined in the same or a different script file? you could update the validateLine function to behave differently under a specific criteria
c
It's in the same file.
s
If you define it, it's going to trigger when a line is added. It's difficult to help you further without knowing what you're trying to accomplish, but you could simply update the function return true if the line isn't something that you want to validate.
Copy code
function validateLine(context) {
  if (context.sublistId === "item") return true;
  if (/** some criteria met is invalid*/) return false;
  return true
}
🙏🏻 1