how to get 'text' with N/query module after using ...
# suitescript
d
how to get 'text' with N/query module after using SQL query? in defualt i get just values
z
Copy code
BUILTIN.DF( Transaction.Status ) AS OrderStatus
The BUILTIN.DF(FIELD) should get you the text
Here are other
builtin
functions that can be helpful as well. https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_161950565221.html
d
BUILTIN.DF(customer.receivablesaccount) didnt work
z
Copy code
var sql = 'select BUILTIN.DF(receivablesaccount) from customer where id = 3231'
var results = query.runSuiteQL({query: sql, params: []}).asMappedResults()
Can you enter an example customers ID in the
3231
and try this? It returned the string name like I would expect and not the account ID.
s
it may not be true, but in my head I think of the
DF
as meaning Display Field
I don't think I've ever seen Oracle documentation on what the DF stands for
🤔 1
or maybe Display Format
z
They define it as `Returns the display value of a field from the target record type without having to join the target record type explicitly`` , so I'm assuming they decided it's Display Field
👍 1