Can I do through client script or user event scrip...
# suitescript
k
Can I do through client script or user event script ? whats best way to prevent users
t
yes you can. I suggest do it under user event. It's a server side script.
k
Thank you Tyn, however do you know what logic I can define
w
I think I'd start with a client script to give the user the direct feedback that they are not allowed to edit the sublist. return false on validateLine, validateInsert and validateDelete if the record has a certain status show a dialog. Might want to also show a warning on lineInit
b
w
Nice @battk, didn't know you could do that on standard sublists. I thought Tyn referred to throwing some error in beforesubmit.
k
@battk That display type but how do you show users, there are lines when you edit. it has only two types, hidden or normal.
b
Sublist.displayType isnt a choice for you if you want to also show the sublist , its for hiding it
your other option is returning false in one of the validation related entry points in a client script
or throwing errors in before submit
w
I suppose you can also hide the standard sublist and add your own sublist of type Staticlist. Or disable all columns
k
I like throwing error via Client script, all I want to prevent user adding additional lines to order