How do I get the 'location' of a PO using suiteQL ...
# suiteql
d
How do I get the 'location' of a PO using suiteQL ... should be dead simply no?
t
@darrenhillconsulting The location is stored at the lineitem level (i.e. in the transactionLine table).
d
Right (just realized). In fact, I think you and I had this same conversation before! Thanks for the help (again)
t
No problem. There are several fields like that, which in the UI, appear to be header-level.
d
@darrenhillconsulting since I happened to have on hand:
Copy code
const queryStr = `SELECT location, BUILTIN.DF(location) AS location_display
					 FROM TransactionLine
					 WHERE transaction = 1234 AND mainline='T'`

query.runSuiteQL(queryStr).asMappedResults()
d
Thanks @dbarnett