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
- 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