PiRemovalTaskStatus Object Members in SuiteCloud

The PiRemovalTaskStatus object provides essential details about the status of personal information removal tasks in SuiteCloud scripts.

·2 min read·View Oracle Docs

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:

PropertyTypeDescription
logListlistRepresents a list of logs for the PI removal task job.
statusstringDescribes 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:

suitescript
1// Create a PI removal task
2var myPiRemovalTask = piremoval.createTask({
3 recordType: 'customer',
4 recordIds: [95],
5 fieldIds: ['email'],
6 historyReplacement: 'removed_value'
7});
8
9// Save the task
10myPiRemovalTask.save();
11var myId = myPiRemovalTask.id;
12
13// Get the initial status of the task
14var myFirstStatus = piremoval.getTaskStatus({
15 id: myId
16});
17
18// Execute the task
19myPiRemovalTask.run();
20
21// Get the updated status of the task
22var mySecondStatus = piremoval.getTaskStatus({
23 id: myId
24});

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.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What script types support the PiRemovalTaskStatus object in NetSuite?
The PiRemovalTaskStatus object is used exclusively in server scripts. For more details on applicable script types, refer to the SuiteScript 2.x documentation.
What status values can the PiRemovalTaskStatus object have?
The status of the PiRemovalTaskStatus object can be PENDING, PROCESSING, COMPLETE, or FAILED. These values indicate the current state of the personal information removal task.
How can I retrieve the status of a personal information removal task in SuiteCloud?
You can retrieve the status of a personal information removal task by using the piremoval.getTaskStatus(options) method and passing the specific task ID.
Can the PiRemovalTaskStatus object be used in client scripts?
No, the PiRemovalTaskStatus object is not used in client scripts. It is exclusively utilized in server scripts within the NetSuite environment.
Source: PiRemovalTaskStatus Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Administration

View all Administration articles →