Entity Deduplication Tasks in NetSuite SuiteScript
Understand how to use Entity Deduplication tasks in NetSuite for merging duplicate records efficiently.
The Entity Deduplication Task feature in NetSuite allows you to merge duplicate records, enhancing data integrity and reducing redundancy across your system. This feature utilizes the N/task module, which facilitates various asynchronous tasks within NetSuite, including merging duplicate records.
What is the EntityDeduplicationTask?
The EntityDeduplicationTask is a specific task type designed to handle the merging of duplicate records in your NetSuite account. It is accessible through SuiteScript and plays a crucial role in maintaining a clean and organized database.
Key Methods and Properties
The EntityDeduplicationTask provides a set of methods and properties that you can leverage:
| Member Type | Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|---|
| Method | EntityDeduplicationTask.submit() | string | Server scripts | Directs NetSuite to place the merge duplicate records task into the task queue and returns a unique ID for the task. |
| Property | EntityDeduplicationTask.dedupeMode | string | Server scripts | The mode in which to merge or delete duplicate records. Use values from the task.DedupeMode enum. |
| Property | EntityDeduplicationTask.entityType | string | Server scripts | The type of entity on which to merge duplicate records, using a task.DedupeEntityType enum. |
| Property | EntityDeduplicationTask.id | string | Server scripts | The ID of the task. |
| Property | EntityDeduplicationTask.masterRecordId | number | Server scripts | Master record ID to retain information from duplicate records while merging. |
| Property | EntityDeduplicationTask.masterSelectionMode | string | Server scripts | Master selection mode using values from the task.MasterSelectionMode enum. |
| Property | EntityDeduplicationTask.recordIds | number[] | Server scripts | Array of internal IDs for records targeted for merging or deletion. |
How to Use the EntityDeduplicationTask
- Create the Task: Utilize the
EntityDeduplicationTask.create(options)method to create a new deduplication task. - Define Parameters: Set parameters such as
dedupeMode,entityType, andrecordIdsto specify the merging process. - Submit the Task: Call the
submit()method to enqueue the deduplication task within NetSuite's task management system. - Monitor Progress: Use the
EntityDeduplicationTaskStatusobject to check the status and verify the success of the merging operation.
Who This Affects
- Administrators: Manage data integrity by utilizing deduplication tasks.
- Developers: Implement and customize deduplication processes within SuiteScript implementations.
- Data Managers: Oversight of data cleanliness and redundancy management.
Key Takeaways
- The
EntityDeduplicationTaskhelps maintain data integrity by merging duplicate records in NetSuite. - Asynchronous task management lets you handle multiple tasks simultaneously, optimizing performance.
- Utilize the provided methods and properties to effectively create and manage deduplication tasks within your scripts.
Frequently Asked Questions (4)
Which script types are supported for using the EntityDeduplicationTask methods?
What must be specified when creating an EntityDeduplicationTask?
How can I monitor the progress of a deduplication task after submitting it?
What is the purpose of the masterRecordId property in EntityDeduplicationTask?
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.
