ANS-1046 · SUITESCRIPT DEVELOPMENT

Does NetSuite Duplicate Record Merging Trigger Scripts?

While NetSuite's built-in duplicate merge functionality does not trigger scripts, merged records can be identified using system notes in a saved search.

Short answer

NetSuite's built-in duplicate record merging does not trigger any script events. To identify records that have been the master of a merge, users can create a saved search. This search should filter System Notes for 'Merged with duplicates' and include System Notes join fields to display relevant merge information.

Scenario

Users often need to track or automate processes related to duplicate record merges within NetSuite. A common requirement is to trigger custom scripts or workflows when records are merged using NetSuite's native duplicate functionality. However, the system's duplicate merge process does not inherently fire script events, making direct automation challenging.

Solution

NetSuite's built-in duplicate record merging functionality does not trigger any script events. Therefore, custom scripts cannot be directly executed when a merge occurs. The most effective method to identify records that have been the master of a merge is to create a saved search.

  1. Create a new saved search for the relevant record type (e.g., Customer, Contact, Lead).

  2. Add a filter: [System Notes : New Value] starts with 'Merged with duplicates'.

  3. Include a column with any System Notes join field to display details about the merge.This saved search will return all records of the specified type that have acted as the master in a merge operation. The value of the System Notes : New Value field follows specific rules:If the merge was with 1 duplicate only: 'Merged with duplicates: {internalid} {name}'If the merge was with more than one duplicate: 'Merged with duplicates: {internalid} {name}, {internalid} {name}...' (comma delimited)Important considerations regarding merged records and system notes:The record will have one system note line for each merge that was done where it was the masterIf the record has gone through a merge where it was not the master, there is no way to find the original merge(s) anymore as the system notes are deleted along with the record

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant