search.duplicates.promise(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

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.

Note:

The parameters and errors thrown for this method are the same as those for search.duplicates(options). For more information about promises, see Promise Object.

Returns

Promise Object

Synchronous Version

search.duplicates(options)

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Client Script Type.

Governance

10 units

Module

N/search Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete promise script example, see Promise Object.

          //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 

        

Related Topics

N/search Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices