Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

May I have a simple Suitelet example?

Tags:

netsuite

I am reading through the Suitescript 2.0 manual just trying to understand the manual itself let alone Suitescript. Can someone provide a simple example how a suitelet would display out to an html page? Like a simple recordtype record field value to display out to a web page. Thanks for any help.

like image 533
TragicWhale Avatar asked Oct 16 '25 16:10

TragicWhale


2 Answers

Here is a basic "Hello World!" Suitelet in SS2.0

/**
 *@NApiVersion 2.x
 *@NScriptType Suitelet
 *@NModuleScope SameAccount
 */

define([], function() {
  function onRequest(params) {
    var html = '<h1>Hello World!<h1>';
    params.response.write({ output: html });
  }

  return {
    onRequest: onRequest
  };
});
like image 91
michoel Avatar answered Oct 19 '25 11:10

michoel


I have some examples that can help you get started on some popular Suitescript 2.0 types including Suitelets at ursuscode.com. Check them out.

like image 41
Adolfo Garza Avatar answered Oct 19 '25 12:10

Adolfo Garza