I am attempting a basic search query of the 'transaction' records (I have also attempted this with 'salesorder' with similar results). The query has no filters, and requests only the internalid as a search column, but for some reason the results include the same record multiple times... sometimes MANY times.
[
{
"internalid": "1984"
},
{
"internalid": "1984"
},
{
"internalid": "1984"
},
{
"internalid": "1998"
},
{
"internalid": "1998"
},
{
"internalid": "1998"
},
{
"internalid": "2490"
},
{
"internalid": "2490"
},
{
"internalid": "2573"
},
{
"internalid": "2573"
},
{
"internalid": "2491"
},
Why would this happen? Is there any way to get the query to only return each record once?
EDIT: Adding code as requested
var filters = [];
var columns = [];
columns.push(new nlobjSearchColumn('internalid'));
var searchResults = nlapiSearchRecord('transaction', null, filters, columns);
return searchResults;