Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
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.
Expand your NetSuite knowledge by joining this month's Ask A Guru Live: PROCURE TO PAY. RSVP on this event now!
Refer a Member to the Community | Earn the Answer Accepter Badge | Vote for the contents you'd like to see
