NetSuite has recently informed us that each of the invoice and timeentry tables have been deprecated within the SuiteQL schema and are no longer supported. As such, any attempts to query either of these tables will cause SuiteQL to throw a search error, causing the "Unable to retrieve columns" error to appear.
As a workaround to querying the invoice table, invoice data may instead be returned within the SuiteQL schema by querying the transaction table and filtering by the recordtype column. To demonstrate, refer to the following example query:
SELECT * FROM transaction WHERE recordtype = 'invoice'
Alternatively, there is a table named Invoice exposed within the SuiteTalk schema that may be utilized for retrieving invoice data from your NetSuite instance. While SuiteTalk is an older schema than SuiteQL and does not possess the same robust support for executing SELECT queries that SuiteQL possesses, it may be beneficial to switch to utilizing this schema to gain access to additional invoice data via the Invoice table as a workaround.
In regards to workarounds for querying the timeentry table, retrieving timesheet data can be accomplished within the SuiteQL schema by instead querying the timebill table. Refer to the following example query as a demonstration:
SELECT * FROM timebill
Further, the SuiteTalk schema also exposes three additional tables that you may wish to use in order to retrieve timesheet data: the TimeBill, TimeEntry, and TimeSheet tables.
Due to these limitations of the SuiteQL schema and API provided by NetSuite, however, these will be the only workarounds for retrieving invoice and timesheet data at this time.
Should any issues persist, please reach out to [email protected] for further assistance.