PiRemovalTask.save()

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Saves 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 this method.

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

_1_CANNOT_BE_EMPTY

Record Type cannot be empty.

The record type is not set.

_1_JOB_WAS_NOT_FOUND

Record Type ‘type’ was not found.

Record type does not exist.

_1_JOB_WAS_NOT_FOUND

Record ID ‘ID’ was not found.

One of the record IDs does not exist.

_1_JOB_WAS_NOT_FOUND

Field ID ‘ID’ was not found.

One of the field IDs does not exist.

_1_JOB_WAS_NOT_FOUND

Workflow ID ‘ID’ was not found.

One of the workflow IDs does not exist.

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