如何通过ODBC将NetSuite TRANSACTION_LINES
与REVENUE_RECOGNITION_SCHEDULES
关联?
我研究过Connect Schema。虽然它表示应该可以加入REVENUE_RECOGNITION_SCHEDULES.JOURNAL_ID
到TRANSACTIONS.TRANSACTION_ID
,但如果我尝试查找单个发票,则会发生故障。
答案 0 :(得分:1)
TRANSACTION_LINES视图有一个名为SCHEDULE_ID的列,它与REVRECSCHEDULES视图中对应的SCHEDULE_ID相匹配。
SELECT
T.TRANID
,R.SCHEDULE_ID
FROM TRANSACTIONS AS T
INNER JOIN
TRANSACTION_LINES AS TL
ON T.TRANSACTION_ID = TL.TRANSACTION_ID
INNER JOIN
REVRECSCHEDULES AS R
ON TL.SCHEDULE_ID = R.SCHEDULE_ID
WHERE
T.TRANSACTION_TYPE = 'Invoice'
AND T.TRANID = 'R0356788'