Does anyone know if it is possible to get the scri...
# suitescript
g
Does anyone know if it is possible to get the script parameters from a RESTlet? I am trying to get the parameters using the sentences below, but they always say null, even though the parameters are not empty in the deployment script.
Copy code
function doPost(context) {
      let request = context;

       var scriptObj = runtime.getCurrentScript();

      const var1= scriptObj.getParameter({ name: 'custscript_var1'});
}
I would like to mention that the script version is 2.1
g
That's exactly what I'm using for a MapReduce script and it works fine. Have not tried with a RESTlet.