piremoval.deleteTask(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Deletes a personal information removal task.

Returns

void

Supported Script Types

Server scripts

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

Governance

20 units

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

UNEXPECTED_ERROR

Cannot delete PIRemoval job that was not saved

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: [95, 107],
    fieldIds: ['email', 'phone'],
    workflowIds: [3, 7],
    historyOnly: true,
    historyReplacement: 'removed_value'
});

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

piremoval.deleteTask({
    id: myTaskId
});
...
// Add additional code 

          

Related Topics

N/piremoval Module
Personal Information (PI) Removal

General Notices