Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
SuiteScript ValidateLine SubTotal field
I would like to use the standard NetSuite 'SubTotal' functionality in conjunction with some custom scripting in order to work out discount values based on the subtotal of lines above.
However, it seems that SubTotal lines only show a value once the line is committed (it shows 0 when entering the line), and I'm assuming that my 'ValidateLine' script is running before the line is committed.
Is there any kind of 'AfterSubmit' type option that can be used with ValidateLine scripts? Or any other way to determine the value of the SubTotal within the ValidateLine action?
If not, is there any way to replicate the 'SubTotal' functionality within SuiteScript (i.e. to add up all the lines above - but only up to the previous SubTotal)?