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;
Please add a filter,
If you are using saved search via code, please add additional filter
as
new nlobjSearchFilter('mainline', null, 'is', 'T')
or['mainline', 'is', 'T']
as the search result pull up the same internal id, multiple times for all line items