hi all i have the sales order in which i have net...
# suitescript
v
hi all i have the sales order in which i have netsuite sticky headers deployed. now on this sales order line level, i want to remove or hide the Remove button based oncondition How can it be possible?
c
I don't believe the API has a way to do this. You would have to manipulate the DOM in a client script in that case. Playing around for a second in chrome's console I got this:
document.querySelector("#item_buttons > table > tbody > tr > td:nth-child(7)").style.display = 'none'
This hides the remove button from the table, and seems to stick across all lines. I would do more testing to make sure it doesn't break anything though.
c
Would you be better off hooking
validateDelete
in your client script to stop the removal? https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4410693608.html (I haven't tried it, I think it'll work for you)
🙌 1
c
^^That's a better solution than mine.
v
d