module (N/piremoval)

SuiteScript 2.0

{PiRemovalTask}.run(){UNEXPECTED_ERROR: {Cannot run unsaved PiRemoval job.}})

N/piremoval Module
Method Description: Runs 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, not when the task is run using
Returns: void
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 20 units
Module: N/piremoval Module
Parent Object: piremoval.PiRemovalTask
Sibling Object Members: PiRemovalTask Object Members
Since: 2019.2
Search NetSuite -


// Code Example 1
// Add additional code
var myPiRemovalTask = piremoval.createTask({
recordType: 'customer',
recordIds: [11, 19],
fieldIds: ['comments', 'phone'],
workflowIds: [1],
historyOnly: false,
historyReplacement: 'removed_value'
var myTaskId =;;
// Add additional code