Is it possible to restrict users from editing SO L...
# suitescript
r
Is it possible to restrict users from editing SO Line Item if the Quantity = Invoiced? Should restrict only to specific lines not the whole order.
c
You can cancelLine during a lineInit depending on your business logic. Note that this has the potential of issues on a PO if you have Purchase Contracts so it's possible that there are also similar issues on Sales Orders depending on whether NetSuite makes native internal calls that interrupt the timing of the cancelLine execution - either a setTimeout or an alternate approach would work.
thankyou 1
Of course, that's UI only - to be safe, you could also error on beforeSubmit to catch non-UI cases.
d
@Ryan Paul Salvador But the standard behaviour of NetSuite already alerts you that you are updating a line that has been invoiced or fulfilled, isnt that message enough for the the user ?