I typically remove lines like so: ``` function rem...
# suitescript
e
I typically remove lines like so:
Copy code
function removeLines(rec, sublistId) {
  while(rec.getLineCount({sublistId: sublistId})) {
    rec.removeLine({sublistId: sublistId, line: 0});
  }
}
w
@erictgrubaugh Can this be done from a UE? I have a client script that will remove my line when I edit and save, but I would rather it happen on view.
e
I think it depends on the sublist; you can try it out, but a lot of fields can't be modified in
beforeLoad
unless you are creating a new record
w
Ah... that would explain it then.. trying to do something that isn't possible. The Sublist was the Bin locations.