Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

search.duplicates(options)

{search}.duplicates({type: {enum},fields: {Object},id: {number}})

N/search Module
search.duplicates()
Method Description: Performs a search for duplicate records based on the account's duplicate detection configuration. This method also includes a promise version, search.duplicates.promise(options). For more information about promises, see Promise Object. This API works only for records that support duplicate record detection (for example, customer, lead, prospect, contact, partner, and vendor records). For more information about duplicate record detection, see Duplicate Record Detection.
Returns: search.Result[] that contains the duplicate records Results are limited to 1000 rows. If there are no search results, this method returns null.
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=search.duplicates(options)

Example:

// Code Example 1
//Add additional code
//...
// Search for duplicates of a specific record using the options.id
// parameter
var duplicatesOfRecord = search.duplicates({
type: search.Type.CONTACT,
id: 425
});

// Search for duplicates based on specific fields on a record type
// using the options.fields parameter
var duplicatesUsingFields = search.duplicates({
type: search.Type.CONTACT,
fields: {
'email' : 'sample@test.com'
}
});
//...
//Add additional code

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