Suiteql How do I Get the salesRep on an Invoice
# ask-stanley-ai
r
Suiteql How do I Get the salesRep on an Invoice
c
AI generated answer (using internal Slack threads):
To get the salesRep on an Invoice using SuiteQL, you would need to join the
transaction
table with the
employee
table on the
salesRep
field. The
salesRep
field on the
transaction
table contains the internal ID of the sales representative associated with the transaction. Here is a sample SuiteQL query:
Copy code
sql
SELECT T.id, E.firstname, E.lastname
FROM transaction T
JOIN employee E ON T.salesRep = E.id
WHERE T.type = 'Invoice'
This query will return the internal ID of the invoice, and the first and last name of the sales representative associated with each invoice. Please note that the actual field names and table names may vary depending on your NetSuite account setup. Always check your schema before running the query. ****** 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.820947707
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817702651
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811880767
Please provide your feedback on this answer.