runtime.Permission

Note:

The content in this help topic pertains to SuiteScript 2.0.

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.0 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.

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/runtime Module

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

N/runtime Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices