Form.removeButton(options)

Method Description

Removes a button.

This method can be used on custom buttons and certain built-in NetSuite buttons. For more information about built-in NetSuite buttons, see Button IDs.

Returns

void

Supported Script Types

SuiteScript 2.x Suitelet Script Type and SuiteScript 2.x User Event Script Type (beforeLoad(context))

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/ui/serverWidget Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.id

string

required

The internal ID name of the button to remove. See Button IDs.

The internal ID must be in lowercase and contain no spaces.

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/ui/serverWidget Module Script Samples.

          //Add additional code
...
function beforeLoad(context) {
    var yourForm = context.form;
    yourForm.removeButton('refund');
}
...
//Add additional code 

        

Related Topics

General Notices