module (N/runtime)

SuiteScript 2.0


// Please search for more information.

N/runtime Module
Property Description: The custom scriptId of the role for the current user. You can use this value instead of User.role. When bundling a custom role, the internal ID number of the role in the target account can change after the bundle is installed. Therefore, in the target account you can use this property to access the unique/custom scriptId assigned to the role.
Type: string (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 -


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