Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

search.duplicates.promise(options)

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=search.duplicates.promise(options) for more information.

N/search Module
search.duplicates.promise()
Method Description: Performs a search for duplicate records asynchronously based on the Duplicate Detection configuration for the account. Returns an array of search.Result objects. This method only applies to records that support duplicate record detection. These records include customer | lead | prospect | partner | vendor | contact. The parameters and errors thrown for this method are the same as those for search.duplicates(options). For more information on promises, see Promise Object.
Returns: Promise Object
Synchronous Version: search.duplicates(options)
Supported Script Types: All client-side scripts For more information, see SuiteScript 2.0 Client Script Type.
Governance: 10 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=search.duplicates.promise(options)

Example:

// Code Example 1
//Add additional code
//...
search.duplicates.promise({
type: search.Type.CUSTOMER,
id: 28
})
.then(function (result) {
log.debug({
details: "Completed: " + result
});
// do something after completion
})
.catch(function onRejected(reason) {
// do something on rejection
});
//...
//Add additional code

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