IntegriWorks

DUP_RECORD — what it means and how to fix it

DUP_RECORD: DUP_RECORD means NetSuite refused to create a record because it duplicates one that already exists - most often a customer, vendor or item with the same name or ID, or duplicate rows in a CSV import. Resolve it by finding the existing record and merging, updating or de-duplicating the input.

When you see this

  • A CSV import fails rows with DUP_RECORD because the file repeats a name or external ID, or matches records already in NetSuite.
  • Saving a customer, vendor or item is blocked because the name or number is already in use.
  • An integration creating records via the API returns DUP_RECORD when it re-sends a record that already exists.

Causes

  • A name or ID that NetSuite enforces as unique already exists - entity name, item name or number, or a field set to be unique.
  • The CSV file contains duplicate rows, or rows that match records already in NetSuite, and the import is set to Add rather than Update.
  • An integration retries a create without checking existence (no external ID match), so it tries to insert a record that is already there.

Fix

Find the existing record, then decide whether to update it, merge duplicates, or clean the input so each record is created once.

  1. Search for the existing record by the duplicated value (name, ID, email) to confirm what it collides with.
  2. For a CSV import, de-duplicate the file and choose the right mode: Update, or Add or Update, with an External ID so existing records are matched not re-added.
  3. For entities, use Duplicate Detection and the merge tool to combine real duplicates instead of forcing a second record.
  4. For integrations, key creates on External ID so a re-send updates the existing record (upsert) instead of raising DUP_RECORD.

Prevent it

  • Always import with an External ID so re-runs update rather than duplicate.
  • Turn on Duplicate Detection for customers, vendors and contacts.
  • Make integrations idempotent: match on External ID before create.

SuiteScript version note: DUP_RECORD is raised by both the UI and CSV import and by SuiteScript and SuiteTalk. The External ID upsert pattern applies across SuiteScript 2.x and the REST and SOAP APIs.

Frequently asked questions

How do I stop a CSV import duplicating records?
Include an External ID column and run the import in Update or Add-or-Update mode. NetSuite then matches each row to the existing record by External ID and updates it, instead of adding a second copy and failing with DUP_RECORD.
What is the difference between DUP_RECORD and a unique-field error?
They are related: DUP_RECORD fires when the whole record duplicates an existing one (same entity or item identity), while a unique-field error fires on a specific field set to be unique. Both are fixed by finding the existing record and updating rather than re-adding.
Can I merge duplicate customers in NetSuite?
Yes. Use Duplicate Detection and the merge function to combine duplicate entities into one master, moving transactions across. Merge real duplicates rather than keeping two records, which keeps reporting and AR accurate.

Last reviewed: by Wouter Nortje, CA