Using SuiteQL, How would i get all vendor bills li...
# ask-stanley-ai
u
Using SuiteQL, How would i get all vendor bills lines for a vendor where the lines have a specific account id?
c
AI generated answer (using internal Slack threads):
To get all vendor bills lines for a vendor where the lines have a specific account id using SuiteQL, you would need to write a query that joins the
transaction
table with the
transactionline
table. The
transaction
table contains the vendor bill header information, while the
transactionline
table contains the line item details. Here is a sample SuiteQL query:
Copy code
sql
SELECT t.id, t.tranid, tl.account, tl.amount
FROM transaction t
JOIN transactionline tl ON t.id = tl.transaction
WHERE t.entity = {vendor_id} AND tl.account = {account_id} AND t.type = 'VendBill'
In this query, replace
{vendor_id}
with the internal id of the vendor and
{account_id}
with the internal id of the account you are interested in. This query will return the id, transaction id, account, and amount for each line on the vendor bills for the specified vendor where the line has the specified account id. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822731435
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816284239
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81108
Please provide your feedback on this answer.