Chris Campbell
10/25/2021, 9:18 PMSearch error occurred: Invalid or unsupported search. I have tried:
var queryResults = query.runSuiteQL({
    query: "SELECT tranid, entity from Transaction GROUP BY entity"
});
and
var resultsQuery = query.create({
    type: query.Type.TRANSACTION
});
resultsQuery.columns = [
    resultsQuery.createColumn({
        fieldId: 'tranid',
    }),
    resultsQuery.createColumn({
        fieldId: 'entity',
        groupBy: true
    }),
];
var results = resultsQuery.run();
Removing the grouping from my queries resolves the error and returns results. Am I doing something wrong here?Clay Roper
10/25/2021, 9:20 PMClay Roper
10/25/2021, 9:21 PMtranid but excluding it from grouping above?Chris Campbell
10/25/2021, 9:32 PMClay Roper
10/25/2021, 9:35 PMClay Roper
10/25/2021, 9:36 PM