SuiteScript 2.0 Revisited Part #2

SuiteScript 2.0 Revisited Part #2

If you are first time reading this blog I suggest you to read previous here this blog of NetSuite as a NetSuite Solution provider and NetSuite Training point of view we would like to help you in netsuite support and netsuite customization using SuiteScript 2.0 which is a complete new design of the SuiteScript model. Here we are discussing about the topics which will help in NetSuite Implementation using suitescript 2.0.

Modern Programming Syntax and Behavior

The underlying design principle of SuiteScript 2.0 is that SuiteScript 2.0 holds same coding standards as JavaScript. This helps in a decreased learning curve for experienced developers. The syntax is straightforward JavaScript. And unlike SuiteScript 1.0, the behavior is consistent. Enhancements to syntax and behavior include the following:

Third party JavaScript API support:

In latest releases SuiteScript 2.0 is designed to support all standard JavaScript. The SuiteScript 2.0 APIs give you programmatic access to NetSuite customization functionality. For generic logic, use custom modules to load your preferred third party JavaScript APIs.

SuiteScript 1.0 nlapi/nlobj prefix retirement:

SuiteScript 2.0 is modeled to look and behave like modern JavaScript which is ECMA Script latest version . To meet that objective, SuiteScript 2.0 methods and objects are not prefixed with nlapi and nlobj. This change also reflects the modular organization of SuiteScript 2.0. SuiteScript 1.0 methods and objects respectively belong to the nlapi and nlobj namespaces. SuiteScript 2.0 methods and objects are encapsulated within various modules.

Usage of properties and enumerations:

SuiteScript 2.0 adopts the usage of properties and enumerations. Most SuiteScript 1.0 getter and setter methods are replaced with properties. Enumerations encapsulate common constants (for example, standard record types).

JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation uses the term enumeration (or enum) to describe the following: a plain JavaScript object with a flat, map-like structure. Within this object, each key points to a read-only string value.

Updated sublist and column indexing: The standard practice in the development world is to start indexing at 0. This behavior is observed in the majority of programming languages. SuiteScript 1.0 starts sublist and column indexing at 1. To bring SuiteScript into alignment with modern JavaScript, sublist and column indexing within SuiteScript 2.0 begins at 0.

Reference : netsuite.com, netsuite help  and netsuite guide.

Feel free to reach out netsuite solution providernetsuite implementationnetsuite consultation , netsuite customizationnetsuite Supportnetsuite Training  

contact us at:

Email : info@smilingcoders.com

Facebook : https://www.facebook.com/Smiling-Coders-Netsuite-Training-Implementation-and-Support-1591053827660082/

Linkedin : https://www.linkedin.com/company/netsuite-academy/


Leave a Reply

Reach Us @

Linkedin
Facebook
info@smilingcoders.com
+91 7306857196