Features of SuiteScript 2.0 over SuiteScript 1.0

1. Map/Reduce Script Type:

Based on the Map/Reduce model, SuiteScript 2.0 introduces a new server-side script type that 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 a single instance of time as per the 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):

“Promises” are JavaScript objects that represent the eventual result of an asynchronous process. Once these objects are created, they serve as placeholders for the future success or failure of an operation. During the duration of time that a promise object is waiting in the background, the remaining segments of the script can still execute.

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 the intuitive means to efficiently traverse search result data, which ultimately helps to increases script performance. Pagination in SuiteScript 2.0, helps users to display results in q 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 the search results, so users have to write a specific logical program to display the specific range of records. Whereas in SuiteScript 2.0, the user does not need to write a specific logical program and the user can display the 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 a particular section would be displayed on a single screen (like 0-700 results on a single screen) which was not user-friendly and was also time-consuming since results had to be loaded simultaneously.

6. Flat File Streaming API:

SuiteScript 1.0, does not provide a 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 the loading and editing of each line of content into memory and the appending of lines back together. The Flat File Streaming API enforces the 10MB limit on individual lines of content only.

Leave a comment

Your email address will not be published. Required fields are marked *