while using Client script 2.1 (pageInit,fieldChanged) as a backend script in suitelet 2.1, scriptContext doesn’t return a object
- I’ve developed a suitelet 2.1 script and from that suitelet I’m calling Clientscript 2.1 script by using form.clientScriptModulePath =“./clientscript.js”; to perform some operation in pageInit and fieldChanged functions of client script, but the scriptContext object which I’m getting in Suitescript 2.1 is differ from suitescript 2.0.
- Client script 2.1 PageInit returns me mode (create/Edit) whereas Client script 2.0 PageInit returns context object and
- Client script 2.1 fieldChanged returns me sublist ID and Client script 2.0 fieldChanged returns context object
can anyone help to understand why we have that difference ? and also any other option to get scriptContext as a object in client script 2.1 ?
run your client entry point as 2.0. if you wan tto write code as 2.1 then call out to other modules that use it or transpile your code down before deployment