Readable names in SuiteQL, no extra JOIN
BUILTIN.DF turns an ID into the text you see on screen: the customer, sales rep or location name.
SELECT
t.tranid AS order_no,
BUILTIN.DF(t.entity) AS customer,
BUILTIN.DF(t.employee) AS sales_rep,
BUILTIN.DF(tl.location) AS location
FROM transaction t
JOIN transactionline tl
ON tl.transaction = t.id
WHERE t.type = 'SalesOrd'
AND tl.mainline = 'T'
AND t.status IN ('E', 'F')
For display, not for filtering. In the WHERE clause always use the ID or code: it’s more efficient and doesn’t depend on how the text is spelled.