is createdfrom field not exposed in suiteQL? need ...
# suiteql
r
is createdfrom field not exposed in suiteQL? need to do a query on customerdeposit where sales order tagged in created from field has a custom checkbox checked and sales order is in pending fulfilment status
c
You'll need to join
transactionline
to get
createdfrom
- you can always search the Records Catalog for details on fields/columns in various records/tables.
r
field is salesorder Can't find this field in record catalog.
c
@raghav Try something like this:
Copy code
SELECT
  tran.id,
  tran.tranid,
  BUILTIN.DF(line.createdfrom) AS so_num
FROM transaction AS tran

JOIN transactionline AS line
ON   line.transaction = tran.id

WHERE
  tran.id = xxxx AND
  line.mainline = 'T'
where
xxxx
is the internal ID of the customer deposit. In my testing, it works as expected and shows the Sales Order.
r
thank you @Clay Roper. Can you help me understand how could I have identified the same from the documentation.
c
I'm not sure it spells this out clearly in any documentation, but Netsuite uses different "views" in certain places that obfuscate the underlying tables. Any transaction will have a record in the
transaction
table with corresponding line details in
transactionline
and data in other joined tables, depending on the transaction type and instance specifics. There might be a Customer Deposit-specific view or search column set that allows you to pull the
salesorder
field for convenience, but that's not something accessible via SuiteQL. Between ODBC SuiteConnect, SuiteQL, Saved Search, Analytics Workbooks, and probably others, there are major and minor differences between record and field names as well as the data accessible by each. It really just takes experience working with them and learning the edges of each to sort it out IMO
r
Thanks for the clarification.