Imad
08/19/2024, 3:05 PMCeligo AI
08/19/2024, 3:05 PMAI generated answer (using internal Slack threads):To find out when the inventory of an item changed through SuiteQL, you would need to sum across all inventory affecting transactions. This is because there isn't a direct way to access on-hand inventory by date via SuiteScript or SuiteQL. You can use the
transaction
table in SuiteQL to get the inventory affecting transactions. The transaction
table contains all the transactions that affect the inventory. You can filter the transactions based on the type
field to get only the inventory affecting transactions.
Here is a sample SuiteQL query that you can use as a starting point:
sql
SELECT itemId, SUM(quantity) as totalQuantity
FROM transaction
WHERE type IN ('SalesOrd', 'PurchOrd', 'RtnAuth', 'InvtAdj')
GROUP BY itemId
This query will give you the total quantity of each item from all the inventory affecting transactions. You can modify this query to suit your needs.
Also, you can use the lastModifiedDate
field in the transaction
table to find out when the inventory of an item changed. This field is updated whenever a transaction is created or modified.
Please note that this approach requires summing across all inventory affecting transactions, which can be resource-intensive if you have a large number of transactions.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
08/19/2024, 3:06 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.856727779
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843293786
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840336502
Celigo AI
08/19/2024, 3:06 PM