piremoval.PiRemovalTask
Object Description |
Encapsulates a task to remove personal information (PI). This object includes lists of the record, field, and workflow IDs to remove personal information from, as well as history replacement information. Use piremoval.createTask(options) to create a piremoval.PiRemovalTask object, or use piremoval.loadTask(options) to load a PI removal task as a piremoval.PiRemovalTask object. To save the object, use PiRemovalTask.save(). To execute the PI removal, use PiRemovalTask.run(). |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Methods and Properties |
|
Since |
2019.2 |
Syntax
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