RE: I am trying to access the Session Object which is set within the Client script using SS 2.0 but “null” value is returned by the API.
var testObject={};
testObject.val='Test Value';
runtime.getCurrentSession().set({
name: "Test",
value: JSON.stringify(testObject)
});
console.log(runtime.getCurrentSession().get({ name: "Test"}));
// Output--> null
https://system.na0.netsuite.com/app/help/helpcenter.nl?fid=section_4296528369.html
Only server script officially supported
Thanks. I tried it in Debugger and it worked so was under impression that It would work for message passing between a Scheduled Script and Client script.
There is no session in Scheduled script.
Scheduled script in not executing under the user session, it’s a system background process.