<https://netsuiteprofessionals.slack.com/archives/...
# suitescript
c
You commit the line before you do anything.
a
How can I check if there is any active but not added line? how can I commit it?
c
You can't. You need to train your users
This isn't a scripting issues. Its an issue with the person at the screen not committing the line and hitting save which is not how the system works
a
Ok but it will cause problem
c
Not trying to come off as an ass Im just saying this is how it works
a
It will save the record with wrong data
c
Yes, not committing a line and hitting save will cause an issue
a
We need to find a way to not let them save
Or commit the line
We need a solution
@erictgrubaugh more discussion here
c
I guess you could spin through the lines and check for an item (if sales order...if not whatever value is always there) and if not all lines have an item, then dont allow save. Its not perfect though. Since the line is "skipped" it shouldn't have a value.
a
Thanks that could be a solution, but as you said it's not perfect. I still think there should be a better solution.
c
The actual solution is to commit the line prior to saving and is user based. This is just a safety check since its something NetSuite does that you have no control over.
e
Chris has already given you my solution as well; I'd inform the users that they must click
Add
or hit
Enter
first. Trivial habit.
a
Thanks
p
Definitely a training issue that does not require a technical solution. No need to be so eager to look for hacks when you can push back on the users :)