Entity Deduplication Tasks in NetSuite SuiteScript

Understand how to use Entity Deduplication tasks in NetSuite for merging duplicate records efficiently.

·2 min read·1 views·View Oracle Docs

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 TypeNameReturn Type / Value TypeSupported Script TypesDescription
MethodEntityDeduplicationTask.submit()stringServer scriptsDirects NetSuite to place the merge duplicate records task into the task queue and returns a unique ID for the task.
PropertyEntityDeduplicationTask.dedupeModestringServer scriptsThe mode in which to merge or delete duplicate records. Use values from the task.DedupeMode enum.
PropertyEntityDeduplicationTask.entityTypestringServer scriptsThe type of entity on which to merge duplicate records, using a task.DedupeEntityType enum.
PropertyEntityDeduplicationTask.idstringServer scriptsThe ID of the task.
PropertyEntityDeduplicationTask.masterRecordIdnumberServer scriptsMaster record ID to retain information from duplicate records while merging.
PropertyEntityDeduplicationTask.masterSelectionModestringServer scriptsMaster selection mode using values from the task.MasterSelectionMode enum.
PropertyEntityDeduplicationTask.recordIdsnumber[]Server scriptsArray of internal IDs for records targeted for merging or deletion.

How to Use the EntityDeduplicationTask

  1. Create the Task: Utilize the EntityDeduplicationTask.create(options) method to create a new deduplication task.
  2. Define Parameters: Set parameters such as dedupeMode, entityType, and recordIds to specify the merging process.
  3. Submit the Task: Call the submit() method to enqueue the deduplication task within NetSuite's task management system.
  4. Monitor Progress: Use the EntityDeduplicationTaskStatus object 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 EntityDeduplicationTask helps 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.

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

Frequently Asked Questions (4)

Which script types are supported for using the EntityDeduplicationTask methods?
The EntityDeduplicationTask methods are supported in server scripts within NetSuite.
What must be specified when creating an EntityDeduplicationTask?
When creating an EntityDeduplicationTask, you must specify parameters such as dedupeMode, entityType, and recordIds to define the merging process.
How can I monitor the progress of a deduplication task after submitting it?
You can monitor the progress of a deduplication task by using the EntityDeduplicationTaskStatus object to check the status and verify the success of the merging operation.
What is the purpose of the masterRecordId property in EntityDeduplicationTask?
The masterRecordId property is used to specify the master record ID that retains information from duplicate records during the merging process.
Source: EntityDeduplicationTaskStatus 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 →