Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Retrieve the Transaction Status Name via ODBC or SuiteQL
When retrieving the Transaction Status via ODBC or SuiteQL, results are displayed as symbols (i.e. A, B, C) instead of "Pending Approval, Billed", etc. This is the sample query that displays status as symbols: SELECT status FROM transaction.
In order to get the desired values of the status as their text equivalent, use BUILTIN.DF(status) instead of just status. This way, it will retrieve the status name (i.e. Pending Approval, Billed).
Sample query tested via SuiteQL in console:
FROMrequire(['N/query'], function (query) {
var csFileIdQuery = "SELECT status FROM transaction";
var results = query.runSuiteQL(csFileIdQuery).asMappedResults();
console.log(results)
Tagged:
1