netsuite The Suitelet and Portlet Scripts


Often we will want to build custom UI pages in NetSuite; enter the Suitelet. The Suitelet script is designed for building internal, custom UI pages. Pages can be free-form HTML, or they can utilize NetSuite's UI Builder APIs to construct forms that follow NetSuite's look and feel.

When it is deployed, a Suitelet receives its own unique URL. The Suitelet then has a single render event that is called whenever that URL is hit with an HTTP GET or POST request. Typically, the response to the GET request would be to render the form itself, and then the form would POST back to itself for processing the form data.

We can also leverage Suitelets to build wizard-style UI progressions using NetSuite's "Assistant" UI components.

Portlets are extremely similar to Suitelets, except that they are specifically used to build custom dashboard widgets rather than full custom pages. Other than that, the two script types function very much alike.