User.roleId
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) |
Module |
|
Since |
2015.2 |
Syntax
Important:
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/runtime Module Script Samples.
// Add additional code
...
var userObj = runtime.getCurrentUser();
log.debug('Custom script ID of current user role: ' + userObj.roleId);
...
// Add additional code