log.audit(options)

Method Description

Logs an Audit message.

Audit messages appear on the Execution Log tab if the Log Level on the script deployment is set to Audit or Debug.

Use this method for scripts in production.

Returns

void

Supported Script Types

Client and server scripts

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

Governance

Amount of logging in any 60 minute period is limited. See N/log Module Guidelines.

Module

N/log Module

Since

2016.1

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.title

string

required

The text to appear in the Title column on the Execution Log tab of the script deployment.

Maximum length is 99 characters. If you set this value to null, an empty string (''), or omit it, the word “Untitled” appears for the log entry.

2016.1

options.details

any

optional

You can pass any value for this parameter.

If the value is a JavaScript Object type, JSON.stringify(obj) is called on the object before displaying the value.

NetSuite truncates any resulting string over 3999 characters.

2016.1

Syntax
Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/log Module Script Sample.

          //Add additional code
...
var myValue = 'value';
log.audit({
    title: 'Audit Entry',
    details: 'Value of myValue is: ' + myValue
});
...
//Add additional code 

        

Related Topics

General Notices