Has anyone been able to successfully been able to ...
# suitescript
s
Has anyone been able to successfully been able to use the search.duplicates method. I've not had much luck detecting actual duplicates with it. It's returning an empty result set. Do I have to use run or runPaged to actually retrieve the response? Here is an example of what I'm trying to do:
Copy code
var search = require('N/search')
var searchType = search.Type.CUSTOMER

var fieldDuplicatesSearch = search.duplicates({
  type: searchType,
  fields: {
    phone: '<tel:(555)867-5309|(555) 867-5309>'
  }
})
b
depends on the duplicate detection settings on the account
👍 1
you need to include all the fields used to match on
👍 1