Does anyone know if there has been a bug introduce...
# suiteql
a
Does anyone know if there has been a bug introduced in 2022.1 which breaks LEFT JOIN for SuiteQL via the REST API? I had a query that was working fine until last Friday.
totalCount
returns the correct number but the
items
array is empty. Removing this clause or changing LEFT JOIN to INNER JOIN fixes the problem. Of course in my case I really do need a LEFT JOIN
c
Try LEFT OUTER JOIN maybe?
I use left joins a lot and never have issues
a
I never did until Fri Apr 15. 🤷‍♂️
Query in question:
Copy code
SELECT Transaction.ID, Transaction.Type, TransactionLine.CreatedFrom, CreatedFromTransaction.Type as CreatedFromTransactionType, Transaction.Entity FROM Transaction  INNER JOIN TransactionLine ON TransactionLine.Transaction = Transaction.ID LEFT JOIN Transaction as CreatedFromTransaction ON TransactionLine.CreatedFrom = CreatedFromTransaction.ID WHERE Transaction.type IN ('SalesOrd', 'PurchOrd', 'CustDep', 'ItemShip', 'CustInvc') AND Transaction.lastModifiedDate > TO_DATE('2022-4-20 15:05:00', 'YYYY-MM-DD hh24:mi:ss') ORDER BY Transaction.lastModifiedDate
And this is what the response looks like:
Copy code
{
  "links": [
    {
      "rel": "self",
      "href": "<https://XXXXXX.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=100>"
    }
  ],
  "count": 0,
  "hasMore": false,
  "items": [],
  "offset": 0,
  "totalResults": 56
}
totalResults
is correct but
items
is empty. Must be a bug.
c
Odd, it worked for me though I am using asmappedresults