Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=task.RecordActionTask for more information.
N/task Module
task.RecordActionTask
Object Description:
The properties of a record action task. Use the methods and properties for this object to submit a record action task into the task queue and to execute it asynchronously.
Supported Script Types:
Server scripts
For more information, see SuiteScript 2.0 Script Types.
Module:
N/task Module
Methods and Properties:
RecordActionTask Object Members
Since:
2019.1
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=task.RecordActionTask
Example:
// Code Example 1
//Add additional code
//...
{
var recordActionTask = task.create({taskType: task.TaskType.RECORD_ACTION});
recordActionTask.recordType = 'timebill';
recordActionTask.action = 'approve';
recordActionTask.params = [{recordId: 1, note: "this is a note for 1"},
{recordId: 5, note: "this is a note for 5"},
{recordId: 23, note: "this is a note for 23"}];
var handle = recordActionTask.submit();
var res = task.checkStatus({taskId: handle}); // returns a RecordActionTaskStatus object
log.debug('Initial status: ' + res.status);
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1544121429.html