SQL Query throws this error “Search error occurred...
# ask-stanley-ai
u
SQL Query throws this error “Search error occurred: Record ‘transaction’ was not found.”
c
AI generated answer (using internal Slack threads):
The error message "Search error occurred: Record ‘transaction’ was not found" is typically thrown when you are trying to perform a search on a record type that does not exist or is not recognized by NetSuite. In this case, 'transaction' is not a valid record type. In NetSuite, 'transaction' is a general term used to refer to various types of records such as SalesOrder, PurchaseOrder, Invoice, etc. When performing a search or creating a record, you need to specify the exact type of transaction record you are working with. For example, if you are working with sales orders, the record type should be 'SalesOrder', not 'transaction'. Here is an example of how to perform a search on a SalesOrder:
Copy code
SELECT 
    salesRep,
    COUNT(entity.internalid)
FROM SalesOrder
In the case of a Suitelet, if you are trying to create a new record, you need to specify the exact type of record you want to create. For example, if you want to create a new invoice, you would use 'invoice' as the record type, not 'transaction' or 'CustInvc'. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8351565
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82951206
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828013361
Please provide your feedback on this answer.