PiRemovalTask.deleteTask()
Method Description |
Deletes the PI Removal task. |
Returns |
void |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
20 units |
Module |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2019.2 |
Errors
Error Code |
Error Message |
Thrown If |
---|---|---|
UNEXPECTED_ERROR |
Cannot delete PiRemoval job that was not saved. |
The PI removal job is not saved. |
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.deleteTask();
...
// Add additional code