N/ui/serverWidget Module for Suitelet UI Customization
N/ui/serverWidget module enables Suitelets to build custom UI components like forms, fields, and sublists in NetSuite.
The N/ui/serverWidget module provides developers with tools to create and manage user interface components within NetSuite. Using Suitelets, you can design custom forms, fields, sublists, and wizards that adhere to the NetSuite aesthetic. This capability enhances user experience by enabling tailor-made interactions and functionalities.
Accessing the NetSuite UI
A key point to remember is that SuiteScript does not allow direct manipulation of the NetSuite UI through the Document Object Model (DOM). Instead, you should exclusively utilize the SuiteScript APIs to interact with the UI components.
When adding UI objects to existing NetSuite pages, ensure that any internal IDs referencing these objects are prefixed with custpage to avoid name conflicts.
Module Members Overview
The N/ui/serverWidget module encompasses various objects and methods that can be employed to enhance user interfaces. Here’s a brief overview of its members:
| Member Type | Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|---|
| Object | serverWidget.Assistant | Object | Suitelets | A scriptable, multi-step NetSuite assistant. |
| Object | serverWidget.Button | Object | Suitelets and beforeLoad user events | A button that appears in a UI object. |
| Object | serverWidget.Field | Object | Suitelets and beforeLoad user events | A standard field in NetSuite. |
| Object | serverWidget.Form | Object | Suitelets and beforeLoad user events | A basic form template. |
| Object | serverWidget.Sublist | Object | Suitelets and beforeLoad user events | A sublist for detailed entries. |
| Method | serverWidget.createForm(options) | serverWidget.Form | Suitelets | Creates and returns a new form object. |
| Method | serverWidget.createList(options) | serverWidget.List | Suitelets | Creates a new list object. |
Important Notes
- Be cautious when naming your objects to prevent conflicts with existing names.
- Take advantage of the various objects available in this module to create a cohesive user experience.
The flexibility of the N/ui/serverWidget module allows developers to streamline their custom Suitelet solutions and provide intuitive interactions within NetSuite, resulting in enhanced productivity and user satisfaction.
Key Methods and Properties Some additional important methods and properties include:
- Assistant Methods: Such as
Assistant.addField()andAssistant.addStep()for building out the assistant flow. - Field Methods: For manipulating fields such as
Field.addSelectOption()to dynamically add choices to dropdowns. - Form Methods: Such as
Form.addSublist()to include detailed records directly within forms.
Implement these tools and methods strategically to maximize the effectiveness of your Suitelets.
Key Takeaways:
- The N/ui/serverWidget module empowers developers to create custom UI elements in Suitelets without DOM access.
- Remember to use
custpageas a prefix for internal IDs to avoid conflicts. - Utilize the various objects and methods to enhance user interactions within the NetSuite environment.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Does the N/ui/serverWidget module allow manipulating the NetSuite UI directly through the DOM?
What is the recommended prefix for internal IDs when adding UI objects to avoid conflict in NetSuite?
Can serverWidget.Button be used in both Suitelets and user events?
Which method is used to create a new form object in the N/ui/serverWidget module?
Was this article helpful?
More in User Interface
- NetSuite 360 Redesign Features Enhanced Interface
NetSuite 360's redesigned interface includes new dashboards, payment methods, and improved account management tools for global users.
- Print to File Feature in NetSuite 2026.1
Print to File in NetSuite 2026.1 enhances document management for efficient mobile printing.
- Open Scanned Vendor Bills in NetSuite 2026.1
Access and manage scanned vendor bills efficiently in NetSuite 2026.1. Learn how to streamline your document management.
- Bill Capture Enhancements in NetSuite 2026.1
Bill Capture enhancements in NetSuite 2026.1 boost efficiency with automated data extraction and improved UI for vendor management.
Advertising
Reach User Interface Professionals
Put your product in front of NetSuite experts who work with User Interface every day.
Sponsor This Category