PiRemovalTaskStatus Object Members in SuiteCloud
The PiRemovalTaskStatus object provides essential details about the status of personal information removal tasks in SuiteCloud scripts.
The PiRemovalTaskStatus object represents the status of personal information removal tasks within NetSuite's SuiteCloud scripting environment. This object is crucial for developers managing data privacy tasks, especially in light of modern data protection regulations.
What is the PiRemovalTaskStatus Object?
The PiRemovalTaskStatus object encapsulates the status details for a personal information removal task that is retrieved via the piremoval.getTaskStatus(options) method. It is specifically used in server scripts to manage tasks related to the removal of personal data.
Key Properties of PiRemovalTaskStatus
The following properties are available for the piremoval.PiRemovalTaskStatus object:
| Property | Type | Description |
|---|---|---|
logList | list | Represents a list of logs for the PI removal task job. |
status | string | Describes the current status of the submitted removal task. |
Possible Status Values
The status of the removal task can fall into one of the following categories:
- PENDING: The task is awaiting execution.
- PROCESSING: The task is currently being executed.
- COMPLETE: The task has been successfully completed.
- FAILED: The task encountered an error during execution.
Supported Script Types
The PiRemovalTaskStatus object is utilized exclusively in server scripts. For comprehensive insight into applicable script types, refer to the SuiteScript 2.x documentation.
Example Usage
Below is a simple code snippet showing how to initiate a personal information removal task and check its status:
1// Create a PI removal task2var myPiRemovalTask = piremoval.createTask({3 recordType: 'customer',4 recordIds: [95],5 fieldIds: ['email'],6 historyReplacement: 'removed_value'7});8 9// Save the task10myPiRemovalTask.save();11var myId = myPiRemovalTask.id;12 13// Get the initial status of the task14var myFirstStatus = piremoval.getTaskStatus({15 id: myId16});17 18// Execute the task19myPiRemovalTask.run();20 21// Get the updated status of the task22var mySecondStatus = piremoval.getTaskStatus({23 id: myId24});This example demonstrates how to track the execution and status of a personal information removal task.
Conclusion
Understanding the PiRemovalTaskStatus object is essential for developers focusing on data privacy management within NetSuite. By leveraging this object, developers can effectively monitor and manage data removal tasks.
Frequently Asked Questions (4)
What script types support the PiRemovalTaskStatus object in NetSuite?
What status values can the PiRemovalTaskStatus object have?
How can I retrieve the status of a personal information removal task in SuiteCloud?
Can the PiRemovalTaskStatus object be used in client scripts?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
