How Suitelet Scripts are Executed

The following steps and diagram provide an overview of the Suitelet execution process:

                                                                                                                                                                                       
  1. Client initiates an HTTP GET or POST request (typically from a browser) for a system-generated URL. A web request object contains the data from the client's request. See N/http Module.

  2. The user's script is invoked, which gives the user access to the entire Server SuiteScript API as well as a web request and web response object.

  3. NetSuite processes the user's script and returns a web response object to the client. The response can be in following forms:

    • Free-form text

    • HTML

    • RSS

    • XML

    • A browser redirect to another page on the Internet

      Important:

      You can only redirect to external URLs from Suitelets that have the Available Without Login preference enabled on the script deployment.

    • A browser redirect to an internal NetSuite page. The NetSuite page can be either a standard page or custom page that has been dynamically generated using UI objects.

  4. The data renders in the user's browser.

Related Topics

General Notices