RecordActionTaskStatus.errors

Note:

The content in this help topic pertains to SuiteScript 2.0.

Parameter Description

The error details of failed action executions. The value of the property is the record instance ID and the corresponding error details. The error details are returned in an unnamed object with two properties: code and message.

Type

Object (read-only)

Supported Script Types

Server scripts

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

Module

N/task Module

Sibling Object Members

RecordActionTaskStatus Object Members

Since

2019.1

Errors

Error Code

Thrown If

READ_ONLY_PROPERTY

Setting the property is attempted.

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/task Module Script Samples.

          // Add additional code
...
var recordActionTask = task.create({
    taskType: task.TaskType.RECORD_ACTION
});
recordActionTask.recordType = 'timebill';
recordActionTask.action = 'approve';
recordActionTask.params = [{recordId: 1}, {recordId: 2}];
var handle = recordActionTask.submit();
var taskStatus = task.checkStatus({taskId: handle}); // returns a RecordActionTaskStatus object 

log.debug(taskStatus.errors); // will log, for example, the following: // { 2: { name:
    'SSS_RECORD_DOES_NOT_SATISFY_CONDITION', message: '...' }}
...
// Add additional code 

        

Related Topics

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

General Notices