Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The NetSuite Pro

The NetSuite Pro Logo The NetSuite Pro Logo

The NetSuite Pro Navigation

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Home/ NetSuite SuiteScript Modules: Complete Guide to Every N/ Module/N/ui/serverWidget Module in NetSuite: Build Suitelet Forms

N/ui/serverWidget Module in NetSuite: Build Suitelet Forms

The N/ui/serverWidget module is used to programmatically build custom forms, sublists, tabs, and field groups for Suitelet pages. It is the foundation of all custom UI in NetSuite server-side scripts.

Building a Simple Form

/**
 * @NApiVersion 2.1
 * @NScriptType Suitelet
 */
define(["N/ui/serverWidget"], (serverWidget) => {
  const onRequest = (context) => {
    if (context.request.method === "GET") {
      const form = serverWidget.createForm({ title: "My Custom Form" });

      form.addField({ id: "custpage_name", label: "Full Name", type: serverWidget.FieldType.TEXT });
      form.addField({ id: "custpage_email", label: "Email", type: serverWidget.FieldType.EMAIL });
      form.addField({ id: "custpage_notes", label: "Notes", type: serverWidget.FieldType.TEXTAREA });

      form.addSubmitButton({ label: "Save" });
      context.response.writePage({ pageObject: form });
    }
  };
  return { onRequest };
});

Common Field Types

Field TypeDescription
FieldType.TEXTSingle-line text
FieldType.TEXTAREAMulti-line text
FieldType.INTEGERWhole number
FieldType.FLOATDecimal number
FieldType.CURRENCYCurrency amount
FieldType.DATEDate picker
FieldType.CHECKBOXBoolean checkbox
FieldType.SELECTDrop-down list
FieldType.MULTISELECTMulti-select list
FieldType.INLINEHTMLRaw HTML content

Back to All NetSuite Modules

Share
  • Facebook

Sidebar

Ask A Question

Stats

  • Questions 6
  • Answers 6
  • Best Answers 0
  • Users 5
  • Popular
  • Answers
  • Rocky

    Issue in running a client script in NetSuite SuiteScript 2.0 ...

    • 1 Answer
  • admin

    How can I send an email with an attachment in ...

    • 1 Answer
  • admin

    How do I avoid SSS_USAGE_LIMIT_EXCEEDED in a Map/Reduce script?

    • 1 Answer
  • admin
    admin added an answer The issue is usually caused by following Wrong script file… September 14, 2025 at 10:33 pm
  • admin
    admin added an answer Steps to send an Invoice PDF by email: define(['N/email', 'N/render',… August 28, 2025 at 3:05 am
  • admin
    admin added an answer This error means your script hit NetSuite’s governance usage limit… August 28, 2025 at 3:02 am

Top Members

Rocky

Rocky

  • 1 Question
  • 22 Points
Begginer
Sophie1022

Sophie1022

  • 0 Questions
  • 20 Points
Begginer
jmargoli

jmargoli

  • 0 Questions
  • 20 Points
Begginer

Trending Tags

clientscript netsuite scripting suitescript
  • NetSuite Customization Best Practices: Building Scalable and Maintainable SolutionsMay 26, 2026
  • NetSuite Next: The Future of AI-Enabled ERPMay 25, 2026
  • SuiteScript Code Assist: A Developer’s New Best FriendMay 24, 2026
  • NetSuite Planning Copilot: Scenario Forecasting Made EasyMay 23, 2026
  • AI-Powered Close Management in NetSuite 2026May 22, 2026
  • Advanced PDF Templates in NetSuite: Performance Optimization and Best PracticesMay 22, 2026
  • N/search vs N/query in SuiteScript 2.1 β€” When to Use WhichMay 22, 2026
  • Building NetSuite RESTlets with AI Integrations in 2026May 22, 2026
  • Advanced PDF Templates in NetSuite: Localization and Multi-Language DocumentsMay 20, 2026
  • Advanced PDF Templates in NetSuite: Integrating Saved Searches for Report-Style DocumentsMay 20, 2026

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Menu

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us

Quick Links

  • NetSuite Scripting
  • NetSuite Customization
  • NetSuite Advanced PDF Template
  • NetSuite Integration
  • NetSuite Reporting & Analytics

Subscribe for NetSuite Insights....

Β© 2026 The NetSuite Pro. All Rights Reserved