Has anyone created a validate line script that onl...
# suitescript
f
Has anyone created a validate line script that only locks the previous line on the Sales order and doesn't allow the user to modify the previous item line but able to add a new line item. ?
n
Do you mean on purpose or just because it's gone horribly wrong?
f
On purpose of course
Or atleast lock the previos line item on the sales order so the user won't change the item fields.
c
@FAgudelo have you identified the API that allows you to control line items like that?
Just looking through the doc now and can't see anything obvious
ASsuming you can't do what you're asking - you could always use the isChanged function to check if there is a line item change and if there is, reset the values from the context.oldRecord .. maybe?
w
Maybe you could set some checkbox on the line after validateline and then prevent edits in "Line Init"?
f
I'm currently using ValidateDelete function on 1.0 my approach maybe to disable the previous line but also you can't delete the line.
Thier's also a clear all lines on Netsuite which on validateDelete it's still clearing all the lines.