NetSuite released the 2nd version of their SuiteScript API – SuiteScript 2.0 which is a complete redesign of the SuiteScript model. Here we will try to cover the features of SuiteScript 2.0 and the advantages it has over SuiteScript 1.0.
Advantages of SuiteScript 2.0 are as follows:
A. Complexity Management and Intuitive Code Organization:
- SuiteScript 2.0 comes with a complete set of new APIs which are contained within modules. These modules are organized and named based on behavior. A NetSuite script loads only those modules that it needs.
- SuiteScript 2.0 also facilitates the creation of custom modules. These custom modules can be used as a replacement for SuiteScript 1.0 libraries. Apart from this, custom modules can be added in SuiteApps and exposed to third parties.
B. Automatic Dependency Management:
SuiteScript 2.0 provides built-in dependency management which enables users to define the SuiteScript 2.0 modules and custom modules that must load prior to script execution. The module loader will automatically load the dependencies of those modules and dependencies of the dependencies. Automatic dependency management feature helps developers to concentrate on the logic of operation instead of dependencies and load order.
C. Modern Programming Syntax and Behavior:
New features of SuiteScript 2.0 over SuiteScript 1.0 are as follows :
1. Map/Reduce Script Type:
Based on the Map/Reduce model, SuiteScript 2.0 introduces a new server-side script type which facilitates a structured framework for server-side scripts that process a large number of records. In SuiteSript 1.0, only 10K units of governance can be executed at single instant of time as per default framework. To execute more than 10K units of governance, a customized logical nlapiYieldScript() programme needs to be written (with the help of NetSuite SuiteScript developer) which can re-schedule and execute programs. SuiteScript 2.0 has a new inbuilt functionality which does not need a customized logical program to execute more than 10K units of governance and it executes it automatically. Also, SuiteCloud Plus users can use these scripts to process records in parallel across multiple processors. The number of processors to utilize from the script deployment record can be selected manually.
2. Asynchronous Client Side Processing (Promises):
All client scripts in SuiteScript 2.0 support the use of promises. Developers can write asynchronous code that is intuitive and efficient using “Promises”. SuiteScript 2.0 provides “Promise” APIs for selected modules. In addition, you can create custom promises in all client scripts.
3. SFTP API:
SuiteScript 2.0 facilitates support for SFTP (Secure File Transfer Protocol). This feature enables the user to securely transfer files between NetSuite and external FTP (File Transfer Protocol) servers. SFTP is packaged with SSH (Secure Shell) and similar to FTP, but files are transferred over a secure connection. Server authorization requires a password GUID (Globally Unique Identifier) and a DSA (Digital Signature Algorithm), ECDSA (Elliptical Curve Digital Signature Algorithm), or RSA (cryptosystem) host key.
4. Cache API:
The SuiteScript 2.0 Cache API enables you to load data into a cache and make it available to one or more scripts. This feature reduces the amount of time required to retrieve data.
5. Search Pagination API:
Search Pagination API enables you to page through search results. This enhancement gives you an intuitive means to efficiently traverse search result data which helps to increases script performance. Pagination in SuiteScript 2.0, helps users to display results in range of specific numbers such as 1-10, 1-50 etc. In SuiteScript 1.0, there is no default functionality to select the number of records that will be displayed in search result and user has to write a specific logical programme to display specific range of records. Whereas in SuiteScript 2.0, user does not need to write specific logical programme and user can display desired range of records in search results just by entering the number of rows that the user wants to display at the time of customizing the erp. So before SuiteScript 2.0, all results belonging to particular section will be displayed in single screen (like 0-700 results in single screen) which was not user friendly and also it was time consuming to load results simultaneously.
6. Flat File Streaming API:
SuiteScript 1.0, does not provide functionality to access the contents of files that are over 10MB. To access these files, a user must partition files into smaller files to read and append file contents in memory.
The SuiteScript 2.0 Flat File Streaming API enables you to efficiently append and process large CSV and plain text files. This enhancement facilitates loading and editing of each line of content into memory and then appending the lines back together. The Flat File Streaming API enforces the 10MB limit on individual lines of content only.
NetSuite is one of the best Cloud ERP solutions in the world. Try a Demo with Tvarana, a NetSuite partner to know more about our NetSuite Services and NetSuite implementation cost. We understand our clients’ business needs & processes and design the ERP system befitting their requirements. With more than decades of experiences and a team of in-house experts, Tvarana provides NetSuite implementation services and NetSuite support services for NetSuite ERP Software.
You can mail your queries at firstname.lastname@example.org and for any feedback or concern, you can call us at +1 770-783-1441.