Modules

filter

 

Objects/Functions

module (N/task)

SuiteScript 2.0

task.EntityDeduplicationTask

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=task.EntityDeduplicationTask for more information.

N/task Module
task.EntityDeduplicationTask
Object Description: All the properties of a merge duplicate records task request. Use the methods and properties of this object to submit a merge duplicate record job task into the NetSuite task queue. When you submit a merge duplicate record task to NetSuite, SuiteScript enables you to use all of the same functionality available through the UI. Use SuiteScript to use the predefined duplicate detection rules, or you can define your own. After the records are merged or deleted, in the UI, the records no longer appear as duplicates at Lists > Mass Update > Entity Duplicate Resolution . For more information about merging duplicate records in NetSuite, see Merging or Deleting Duplicate Records. To use the EntityDeduplicationTask Object: Use task.create(options) to create the EntityDeduplicationTask object. Use EntityDeduplicationTask.entityType to select the entity type on which you want to merge duplicate records. Use EntityDeduplicationTask.dedupeMode to select the action to take for the duplicate records. Use a EntityDeduplicationTask.masterSelectionMode enum value to identify which record to use as the master record in the merge. If you use MasterSelectionMode.SELECT_BY_ID for the master selection mode, set the ID of the master record with EntityDeduplicationTask.masterRecordId. Identify the duplicate records. Use the search.duplicates(options) method in the N/search Module to find the duplicate records. Use EntityDeduplicationTask.submit() to submit the merge duplicate record task to the NetSuite task queue. Use the properties for the task.EntityDeduplicationTaskStatus object to get the status of the merge duplicate record task. Use the following guidelines with the EntityDeduplicationTask Object: You can only submit 200 records in a single merge duplicate records task. The merge duplicate functionality on non-entity records is not supported in SuiteScript. You must have full access to the Duplicate Record Management permission to merge duplicates. For a complete list of this object’s methods and properties, see EntityDeduplicationTask Object Members.
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/task Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=task.EntityDeduplicationTask

Example:

// Code Example 1
//Add additional code
//...
var dedupeTask = task.create({taskType: task.TaskType.ENTITY_DEDUPLICATION});
dedupeTask.entityType = task.DedupeEntityType.CUSTOMER;
dedupeTask.dedupeMode = task.DedupeMode.MERGE;
dedupeTask.masterSelectionMode = task.MasterSelectionMode.MOST_RECENT_ACTIVITY;
dedupeTask.recordIds = ['107', '110'];
var dedupeTaskId = dedupeTask.submit();
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4345799008.html