new nlobjContext() → {nlobjContext}
Return a new instance of nlobjContext used for user and script context information.
- Source:
- nlapihandler_stubs.js, line 2580
Returns:
- Type
- nlobjContext
Methods
-
getAllSessionObjects() → {string[]}
-
return an array containing the names of all keys used to set session objects
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2794
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:
- nlapihandler_stubs.js, line 2894
Returns:
- Type
- Object
-
getCompany() → {string}
-
return the account ID of the current user.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2667
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:
- nlapihandler_stubs.js, line 2656
Returns:
- Type
- int
-
getDepartment() → {int}
-
return the internalId of the current user's department.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2678
Returns:
- Type
- int
-
getDeploymentId() → {string}
-
return the deployment ID for the current script
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2839
Returns:
- Type
- string
-
getEmail() → {string}
-
return the email address of the current user.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2645
Returns:
- Type
- string
-
getEnvironment()
-
return the environment that the script is executing in: SANDBOX, PRODUCTION, BETA, INTERNAL
- Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 2811
-
getExecutionContext() → {string}
-
return the execution context for this script: webServices|csvImport|client|userInterface|scheduledScript|portlet|suitelet|debugger|custommassupdate
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2711
Returns:
- Type
- string
-
getFeature(name) → {boolean}
-
return true if feature is enabled, false otherwise
Parameters:
Name Type Description name
string - Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2734
Returns:
- Type
- boolean
-
getLocation() → {int}
-
return the internalId of the current user's location.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2689
Returns:
- Type
- int
-
getLogLevel()
-
return the logging level for the current script execution. Not supported in CLIENT scripts
- Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 2817
-
getName() → {string}
-
return the name of the current user.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2590
Returns:
- Type
- string
-
getPercentComplete() → {int}
-
return the % complete specified for the current scheduled script execution
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2850
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:
- nlapihandler_stubs.js, line 2746
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:
- nlapihandler_stubs.js, line 2758
Returns:
- Type
- string
-
getRemainingUsage() → {int}
-
return the amount of usage units remaining for this script.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2722
Returns:
- Type
- int
-
getRole() → {string}
-
return the internalId of the current user's role.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2612
Returns:
- Type
- string
-
getRoleCenter() → {string}
-
return the internalId of the current user's center type.
- Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 2634
Returns:
- Type
- string
-
getRoleId() → {string}
-
return the script ID of the current user's role.
- Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 2623
Returns:
- Type
- string
-
getScriptId() → {string}
-
return the script ID for the current script
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2828
Returns:
- Type
- string
-
getSessionObject(name) → {string}
-
return value of session object set by script
Parameters:
Name Type Description name
string - Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2770
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:
- nlapihandler_stubs.js, line 2872
-
getSubsidiary() → {int}
-
return the internalId of the current user's subsidiary.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2700
Returns:
- Type
- int
-
getUser() → {string}
-
return the internalId of the current user.
- Since:
- 2007.0
- Source:
- nlapihandler_stubs.js, line 2601
Returns:
- Type
- string
-
getVersion() → {string}
-
return the NetSuite version for the current account
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 2805
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:
- nlapihandler_stubs.js, line 2862
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:
- nlapihandler_stubs.js, line 2783
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:
- nlapihandler_stubs.js, line 2883