Modules

filter

 

Objects/Functions

module (N/runtime)

SuiteScript 2.0

runtime.Session

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=runtime.Session for more information.

N/runtime Module
runtime.Session
Object Description: Encapsulates the user session for the currently executing script. Use this object to set and get user-defined objects for the current user session. Use the objects to track user-related session data. For example, you can gather information about the user scope, budget, or business problems. Use Session.set(options) to set session object values. Use Session.get(options) to retrieve session object values. For a complete list of this object’s methods, see Session Object Members.
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/runtime Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=runtime.Session

Example:

// Code Example 1
// Add additional code
//...
var sessionObj = runtime.getCurrentSession(); //sessionObj is a runtime.Session object
sessionObj.set({
name: 'myKey',
value: 'myValue'
});
log.debug('Session object myKey value: ' + sessionObj.get({name: 'myKey'});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4296528369.html