piremoval.loadTask(options)

Method Description

Retrieves an existing personal information removal task.

Returns

piremoval.PiRemovalTask

Supported Script Types

Server scripts

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

Governance

None

Module

N/piremoval Module

Sibling Object Members

N/piremoval Module Members

Since

2019.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.id

number

required

Unique identifier of the personal information removal task.

Errors

Error Code

Error Message

Thrown If

_1_WAS_NOT_FOUND

PIRemoval job was not found.

Job with the ID provided was not found.

Syntax

Important:

The following code snippet 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: [95],
    fieldIds: ['email'],
    historyReplacement: 'removed_value'
});

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

var myLoadedPiRemovalTask = piremoval.loadTask({
    id: myId
});

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

          

Related Topics

General Notices