Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
NSC | SuiteQL Query: Using BUILT.CF() to Get Transaction Status Key Value Pair
Scenario:
A NetSuite user is looking to optimize their query process by implementing a filtering mechanism for transaction records based on specific criteria. They aim to retrieve only the transactions with a particular transaction type and status code.
Solution:
Instead of using two fields in the WHERE clause, users can utilize BUILTIN.CF to filter both the transaction type AND the transaction status in one condition. The sample query below shows how this can be achieved:
SELECT BUILTIN.CF(transaction.status), id, type, BUILTIN.DF(transaction.status) FROM transaction WHERE BUILTIN.CF(transaction.status) = 'SalesOrd:B';
Important: You must use this function on queries that use filters with composite key value fields to avoid potential result errors. See the syntax section below for an example of a filtered query on composite key value fields.
Refer a Member to the Community | Earn the Answer Accepter Badge | Vote for the contents you'd like to see