Modules
Objects/Functions
SuiteScript 2.0
{Session}.get({name: {string*}})
N/runtime Module
Session.get()
Method Description:
Returns the user-defined session object value associated with a session object key.
Both the session object value and associated key are defined using Session.set(options).
If the key does not exist, this method returns null.
Returns:
string | null
Supported Script Types:
Client and server scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/runtime Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=Session.get(options)
Example:
// Code Example 1
// Add additional code
//...
var sessionObj = runtime.getCurrentSession();
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_4296666278.html