ANS-1775 · CUSTOM FIELDS, RECORDS & FORMS

How to Open a NetSuite Dialog from a Checkbox Field Change Event

Trigger interactive dialogs in NetSuite using a custom checkbox field and SuiteScript 2.x Client Scripts.

Short answer

To trigger a NetSuite dialog from a checkbox, create a custom checkbox field and a Client Script. Use the fieldChanged event to detect when the checkbox is checked. When active, utilize the N/ui/dialog module to display a modal dialog, which can optionally load dynamic content from a Suitelet.

Scenario

Users often require a method to present additional information or gather input dynamically based on a user action within a NetSuite record. A common requirement is to display a popup dialog when a specific checkbox field is marked, providing context-sensitive details or prompting for further action without navigating away from the current page.

Solution

  1. Implement a custom field of type Checkbox.

  2. Create a Client Script configured to execute on the fieldChanged event for the created checkbox field.

  3. Within the fieldChanged function, include logic to detect when the checkbox is checked.

  4. When the checkbox is checked, utilize the N/ui/dialog module to open a modal popup. This dialog can present static information or display dynamic content, which is commonly served by a Suitelet for integrated and interactive experiences.

  5. It is important to note that solutions involving direct Document Object Model (DOM) manipulation are generally discouraged and should be avoided.

Expert NetSuite Support

Need help with this NetSuite issue?

Custom Fields, Records & Forms consulting and configuration support

Talk to a consultant