Class: nlobjContext

nlobjContext

new nlobjContext() → {nlobjContext}

Return a new instance of nlobjContext used for user and script context information.
Source:
Returns:
Type
nlobjContext

Methods

getAllSessionObjects() → {string[]}

return an array containing the names of all keys used to set session objects
Since:
  • 2009.2
Source:
Returns:
Type
string[]

getColorPreferences() → {Object}

return an Object containing name/value pairs of color groups to their corresponding RGB hex color based on the currenly logged in user's color them preferences.
Since:
  • 2010.1
Source:
Returns:
Type
Object

getCompany() → {string}

return the account ID of the current user.
Since:
  • 2007.0
Source:
Returns:
Type
string

getContact() → {int}

return the internal ID of the contact logged in on behalf of a customer, vendor, or partner. It returns -1 for non-contact logins
Since:
  • 2009.1
Source:
Returns:
Type
int

getDepartment() → {int}

return the internalId of the current user's department.
Since:
  • 2007.0
Source:
Returns:
Type
int

getDeploymentId() → {string}

return the deployment ID for the current script
Since:
  • 2009.2
Source:
Returns:
Type
string

getEmail() → {string}

return the email address of the current user.
Since:
  • 2007.0
Source:
Returns:
Type
string

getEnvironment()

return the environment that the script is executing in: SANDBOX, PRODUCTION, BETA, INTERNAL
Since:
  • 2008.2
Source:

getExecutionContext() → {string}

return the execution context for this script: webServices|csvImport|client|userInterface|scheduledScript|portlet|suitelet|debugger|custommassupdate
Since:
  • 2007.0
Source:
Returns:
Type
string

getFeature(name) → {boolean}

return true if feature is enabled, false otherwise
Parameters:
Name Type Description
name string
Since:
  • 2009.2
Source:
Returns:
Type
boolean

getLocation() → {int}

return the internalId of the current user's location.
Since:
  • 2007.0
Source:
Returns:
Type
int

getLogLevel()

return the logging level for the current script execution. Not supported in CLIENT scripts
Since:
  • 2008.2
Source:

getName() → {string}

return the name of the current user.
Since:
  • 2007.0
Source:
Returns:
Type
string

getPercentComplete() → {int}

return the % complete specified for the current scheduled script execution
Since:
  • 2009.2
Source:
Returns:
Type
int

getPermission(name) → {int}

return current user's permission level (0-4) for this permission
Parameters:
Name Type Description
name string
Since:
  • 2009.2
Source:
Returns:
Type
int

getPreference(name) → {string}

return system or script preference selection for current user
Parameters:
Name Type Description
name string
Since:
  • 2009.2
Source:
Returns:
Type
string

getRemainingUsage() → {int}

return the amount of usage units remaining for this script.
Since:
  • 2007.0
Source:
Returns:
Type
int

getRole() → {string}

return the internalId of the current user's role.
Since:
  • 2007.0
Source:
Returns:
Type
string

getRoleCenter() → {string}

return the internalId of the current user's center type.
Since:
  • 2008.2
Source:
Returns:
Type
string

getRoleId() → {string}

return the script ID of the current user's role.
Since:
  • 2008.2
Source:
Returns:
Type
string

getScriptId() → {string}

return the script ID for the current script
Since:
  • 2009.2
Source:
Returns:
Type
string

getSessionObject(name) → {string}

return value of session object set by script
Parameters:
Name Type Description
name string
Since:
  • 2009.2
Source:
Returns:
Type
string

getSetting(type, name)

return a system/script setting. Types are SCRIPT, SESSION, FEATURE, PERMISSION
Parameters:
Name Type Description
type string
name string
Since:
  • 2007.0
Deprecated:
  • Yes
Source:

getSubsidiary() → {int}

return the internalId of the current user's subsidiary.
Since:
  • 2007.0
Source:
Returns:
Type
int

getUser() → {string}

return the internalId of the current user.
Since:
  • 2007.0
Source:
Returns:
Type
string

getVersion() → {string}

return the NetSuite version for the current account
Since:
  • 2009.2
Source:
Returns:
Type
string

setPercentComplete(ct) → {void}

set the % complete for the current scheduled script execution
Parameters:
Name Type Description
ct float the percentage of records completed
Since:
  • 2009.2
Source:
Returns:
Type
void

setSessionObject(name, value) → {void}

set the value of a session object using a key.
Parameters:
Name Type Description
name string
value string
Since:
  • 2009.2
Source:
Returns:
Type
void

setSetting(type, name, value)

set a system/script setting. Only supported type is SESSION
Parameters:
Name Type Description
type string
name string
value string
Since:
  • 2007.0
Deprecated:
  • Yes
Source: