Build a simple portlet that posts data to a servlet
This sample is a portlet script builds a simple a simple for that posts data to a servlet.
The conversion of this script from SuiteScript 1.0 to SuiteScript 2.0 includes the following:
-
JSDoc tags are added at the top of the script to indicate the script version and script type.
-
The
definestatement is added which imports the N/portlet module. -
The
returnstatement is added with therenderentry point. -
The
addField,addSelectOption, andsetSubmitButtonfunctions are changed to methods that accept an object as the parameter. -
The
setLayoutTypefunction is changed to theupdateLayoutandupdateBreakTypemethods.
|
SuiteScript 1.0 Script |
SuiteScript 2.0 Script |
|---|---|
|
|