PiRemovalTaskStatus Object for Personal Information Removal
PiRemovalTaskStatus object provides status details for 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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category