Monday, September 24, 2018

Get the Quantity of the Item Sublist in ODBC

The following example will show the Quantity of the Item Sublist in a Sales Order record.
 
1. Navigate to Setup > Accounting > Chart of Accounts.
 
2. Take note of the Internal ID of the Sales Account.
 
3. Navigate to Transactions > Sales > Enter Sales Orders > List.
 
4. Take note of the Internal ID of the Sales Order Record.
 
5. Execute the SQL Statement below. Make sure to replace the Internal ID of the Sales Account with ACCOUNT_ID and the Internal ID of the Sales Order record with TRANSACTION_ID.
 
SELECT tlines.ACCOUNT_ID, ABS(tlines.ITEM_COUNT)
FROM Administrator.TRANSACTION_LINES AS tlines, Administrator.TRANSACTIONS AS trans
WHERE Administrator.TRANSACTION_LINES.TRANSACTION_ID = Administrator.TRANSACTIONS.TRANSACTION_ID
AND trans.TRANSACTION_ID = 621
AND tlines.ACCOUNT_ID = 55;

No comments:

Post a Comment