Working with Custom Buttons

You can add custom buttons to forms to initiate client SuiteScript. For example, you could add Create Invoice button on a customer form that performs a specific function when the button is clicked. The Custom Actions subtab is visible when the Client SuiteScript feature is enabled in your account.

Important:

Custom buttons appear only when a record is in Edit mode. To make a button appear in View mode, use a User Event Script or Workflow.

To add a custom button to associate with client SuiteScript:

  1. On the Custom Code subtab of the form, in the Script File field, add the client SuiteScript. For more information, see Associating Custom Code (Client SuiteScript) Files With Custom Forms.

    The primary object used to encapsulate custom buttons is serverWidget.Button. For more information, see serverWidget.Button.

  2. In the Label field, enter the UI label for the button. You can enter up to 99 characters.

  3. In the Function field, enter the name of the function to perform when the button is clicked. The function can exist in your client SuiteScript file or any library file you have attached to the Custom Code subtab.

  4. In the Display As column, select Button to display the button as an inline button. Select Menu to have the button to appear as an action in the More Actions menu. For more information, see About Button and Action Layout.

  5. Click Save.

Related Topics

General Notices