This method is provided by the module N/ui/serverWidget Module to remove button. This method can be used on custom buttons and certain built-in NetSuite buttons.
function beforeLoad(context) {
var yourForm = context.form;
yourForm.removeButton('refund');
}
The built in button that can be removed are list below.
Button UI Label
Add Items
Accept
Accept Payment
Apply
Approve
Approve Return
Authorize Return
Auto Fill
Bill
Bill Remaining
Cancel Order
Cancel Return
Clear Splits
Close
Convert
Convert to Inventory
Convert to Lot Numbered Inventory
Convert to Serialized Inventory
Create Build
Create Matrix
Credit
Decline
Delete
Fax
Fulfill
Generate Price List
Generate Statement
GL Impact
Go To Register
Grab
Make Copy
Make Payment
Make Standalone Copy
Memorize
Merge
New
New Event Field
Next Bill
Next Week
Prev Week
Print Bill of Materials
Print Label
Print Labels
Print Picking Ticket
Print Summary
Quick Accept
Recalc
Receive
Refund
Reject
Renew
Reset
Revenue Commitment Reversal
Save As
Save & Bill
Save & Convert
Save & Copy
Save & Edit
Save & Email
Save & Fulfill
Save & New
Save & Next
Save & Print
Save & Print BOM
Save & Print Label
Save & Refund
Save & Same
Save Baseline
Search
Show Activity
Submit Invoice
Tentative
Unbuild
Update Matrix
Update VSOE
View All Transactions
Void
W4 Worksheet
For more details: NetSuite Applications Suite – Button IDs (oracle.com)