Using SuiteScript 2.x Scripts with SuiteScript 1.0 Scripts
If converting your SuiteScript 1.0 scripts to SuiteScript 2.x is not feasible in your situation, you can use SuiteScript 2.x to develop any new functionality within a RESTlet and call the RESTlet from your SuiteScript 1.0 script using the nlapiRequestRestlet()
function.
This approach lets you take advantage of the features, APIs, and functionality enhancements available in SuiteScript 2.x and use them to build new features and extend the capabilities of your existing SuiteScript 1.0 scripts.
To use SuiteScript 2.x scripts with SuiteScript 1.0 scripts, you need to do the following:
-
Create a separate RESTlet script to contain your SuiteScript 2.x code. For information about RESTlets, see SuiteScript 2.x RESTlet Script Type.
-
Update your SuiteScript 1.0 script to add the nlapiRequestRestlet(scriptId, deploymentId, urlParams, body, headers, httpMethod) function with the details of the RESTlet script.