Modules

filter

 

Objects/Functions

module (N/task)

SuiteScript 2.0

RecordActionTask.condition

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=RecordActionTask.condition for more information.

N/task Module
RecordActionTask.condition
Parameter Description: The condition used to select record IDs of records for which the action is to be executed. This parameter is specified with the task.ActionCondition enum. This is used in conjunction with RecordActionTask.paramCallback. If RecordActionTask.paramCallback is not specified, this default callback is used: function(v) { return { recordId: v }; }.
Type: Object
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/task Module
Sibling Object Members: RecordActionTask Object Members
Since: 2019.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=RecordActionTask.condition

Example:

// Code Example 1
// Add additional code
//...
var recordActionTask = task.create({taskType: task.TaskType.RECORD_ACTION});
recordActionTask.recordType = 'timebill';
recordActionTask.action = 'approve';
recordActionTask.condition = task.ActionCondition.ALL_QUALIFIED_INSTANCES;
recordActionTask.paramCallback = function(v) {
return { recordId: v, note: "this is a note for " + v };
};
var handle = recordActionTask.submit();
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1544123142.html