Modules

filter

 

Objects/Functions

module (N/runtime)

SuiteScript 2.0

User.role

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

N/runtime Module
User.role
Property Description: The internal ID of the role for the current user.
Type: number (read-only)
Supported Script Types: Client and 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=User.role

Example:

// Code Example 1
// Add additional code
//...
var userObj = runtime.getCurrentUser();
log.debug('Internal ID of current user role: ' + userObj.role);
//...
// Add additional code

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