Script.getRemainingUsage()

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Returns the number of units remaining (per governance limitations) for the currently executing script.

For more information, see SuiteScript Governance and Limits.

Returns

number

Supported Script Types

Client and server scripts

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

Governance

None

Module

N/runtime Module

Since

2015.2

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 scriptObj = runtime.getCurrentScript();
log.debug('Remaining governance units: ' + scriptObj.getRemainingUsage());
...
// Add additional code 

        

General Notices