Tiina Böös
05/07/2026, 12:40 PMCeligo AI
05/07/2026, 12:40 PMAI generated answer (using internal Slack threads):The behavior you're observing is due to the way NetSuite handles transaction statuses in different contexts. In SuiteScript, when you're querying the
status field of a transaction, the values you're comparing against are the internal IDs of the status, not the display values. These internal IDs are typically in the format SalesOrd:A, SalesOrd:B, etc.
However, in other contexts such as the browser console, NetSuite Script Debugger, or SQuirreL SQL, the status field may be interpreted differently. In these contexts, the status field may be interpreted as the display value of the status, not the internal ID. This is why you're seeing different results when you use AND so.status IN ('A', 'B', 'D', 'E', 'F') versus AND so.status IN ('SalesOrd:A', 'SalesOrd:B', 'SalesOrd:D', 'SalesOrd:E', 'SalesOrd:F').
In the case of the User Event script, it seems that the query is being run as a subquery. In this context, the status field is being interpreted as the internal ID, which is why the query with the SalesOrd: prefix is returning results.
In summary, the way the status field is interpreted can vary depending on the context in which the query is run. When writing your queries, you'll need to take into account the context and adjust your query accordingly.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
05/07/2026, 12:41 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812347472
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.793274
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.789123654
Celigo AI
05/07/2026, 12:41 PM