runtime.Permission

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.x documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.

Enum Description

Holds the user permission level for a specific permission ID. This is the type returned by the User.getPermission(options) method.

For information about working with NetSuite permissions, see NetSuite Permissions Overview and Permission Names and IDs.

Module

N/runtime Module

Sibling Module Members

N/runtime Module Members.

Since

2015.2

Values

Value

FULL

EDIT

CREATE

VIEW

NONE

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();
var userPermission = userObj.getPermission({
    name: 'ADMI_ACCOUNTING'
});
log.debug('User permission of ADMI_ACCOUNTING: ' + 
    (userPermission === runtime.Permission.FULL ? 'FULL' : userPermission);
...
//Add additional code 

          

Related Topics

General Notices