PiRemovalTask.run()

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Runs the PI removal task.

All validation for the task (for example, ensuring that the specified record IDs are valid) occurs when the task is saved using PiRemovalTask.save(), not when the task is run using PiRemovalTask.run().

Returns

void

Supported Script Types

Server scripts

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

Governance

20 units

Module

N/piremoval Module

Parent Object

piremoval.PiRemovalTask

Sibling Object Members

PiRemovalTask Object Members

Since

2019.2

Errors

Error Code

Error Message

Thrown If

UNEXPECTED_ERROR

Cannot run unsaved PiRemoval job.

The PI removal job is not saved.

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/piremoval Module Script Sample.

            // Add additional code
...
var myPiRemovalTask = piremoval.createTask({
    recordType: 'customer',
    recordIds: [11, 19],
    fieldIds: ['comments', 'phone'],
    workflowIds: [1],
    historyOnly: false,
    historyReplacement: 'removed_value'
});

myPiRemovalTask.save();
var myTaskId = myPiRemovalTask.id;

myPiRemovalTask.run();
...
// Add additional code 

          

Related Topics

piremoval.PiRemovalTask
N/piremoval Module
Personal Information (PI) Removal

General Notices