module function · N/search

duplicates()

search.duplicates(options)

Performs a search for duplicate records based on the duplicate detection configuration for the account.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
search.duplicates(options)
Module
N/search
Returns
search.Result []
Governance
10 units
Script types
Client and server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1search.duplicates({2    type:   /* enum, required */,3    fields: /* Object, optional */,4    id:     /* number, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.typeenumrequiredThe search type that you want to check for duplicates. Use the search.Type enum for this parameter. The type you specify must correspond to a record type that supports duplicate record detection (for example, customer, lead, prospect, contact, partner, and vendor records).
options.fieldsObjectoptionalA set of key-value pairs used to detect duplicates. The keys are internal ID names of the fields used to detect duplicates. You can specify fields such as companyname, email, name, phone, address1, city, state, and zipcode. For example, to detect duplicates based on the value of the email field, use 'email' : 'sample@test.com' . Use this parameter to specify the fields (and their values) to use to detect duplicates. If you are searching for duplicates based on fields that appear on a certain record type, this parameter is required. If you are searching for duplicates of a specific record (of the specified type), use the options.id parameter instead.
options.idnumberoptionalInternal ID of an existing record. Use this parameter to specify a record to detect duplicates of. The duplicate record detection settings in the account determine which fields are used to detect duplicates of the specified record. If you are searching for duplicates of a specific record (of the specified type), this parameter is required. If you are searching for duplicates based on fields that appear on a certain record type, use the options.fields parameter instead.
B

No Mynt syntax yet.

Nothing in the language compiles to search.duplicates(options) today. How should it read?

C

Competing syntax for duplicates, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/search · search.duplicates(options)

Suggest syntax for duplicates