piremoval.createTask(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Creates a new 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.fieldIds

number[]

optional

Represents IDs of fields whose personal information is removed.

options.historyOnly

boolean

optional

Indicates whether the PI removal task removes system note information only, not field values or workflow history. If true, the task removes information from system notes only. If false, the task removes information from system notes, workflow history, and field values. The default value is false.

options.historyReplacement

string

optional

Represents the text used in system notes to replace the original values.

options.recordIds

number[]

optional

Represents IDs of records whose personal information is removed.

options.recordType

string

optional

Describes the record type that is updated by the PI removal task.

options.workflowIds

number[]

optional

Represents the workflow IDs whose history is processed by the PI removal task.

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;

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

          

Related Topics

N/piremoval Module
Personal Information (PI) Removal

General Notices