The content in this help topic pertains to SuiteScript 2.0.

Object Description

A button that appears in a UI object.

To add a button, use Form.addButton(options) or Sublist.addButton(options). When adding a button to a record or form, consider using a beforeLoad user event script.

Custom buttons only appear during Edit mode. On records, custom buttons appear to the left of the printer icon.


Currently you cannot use SuiteScript to add or remove a custom button to or from the More Actions menu. You can, however, do this using SuiteBuilder point-and-click customization. See Configuring Buttons and Actions.

For a complete list of this object’s properties, see Button Object Members.

Supported Script Types

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


N/ui/serverWidget Module




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 
var form = serverWidget.createForm({
    title : 'Simple Form'
var button = form.addButton({
    id : 'buttonid',
    label : 'Test'

//Add additional code 


Related Topics

N/ui/serverWidget Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices