Should the field `lastquantityavailablechange` exi...
# suiteql
a
Should the field
lastquantityavailablechange
exist in a query on the
Item
table using suiteql? If I cannot see it, might it be a permission error? And what permission might I be missing?
t
I've never seen that field exposed via SuiteQL.
Here are the quantity-related fields that I normally see in the Item table via SuiteQL.
a
Hmm. So do you have any suggestions on how I might be able to get a list of Item ID's whose total quantity available has been modified as of a given date?
(Using SuiteQL)
t
Not easily. There's some potentially helpful code in this though: https://timdietrich.me/blog/netsuite-inventory-balance-history-suitelet/
🏆 1
a
That's really helpful actually
So I am not sure if I am oversimplifying, but it seems if I just wanted to get a list of inventory item id's whose inventory may have changed since a certain date, I believe I could get that with this query:
Copy code
SELECT TransactionLine.Item
FROM TransactionLine 
WHERE TransactionLine.IsInventoryAffecting = 'T' 
AND TransactionLine.LineLastModifiedDate > TO_DATE('2021-06-16 16:00:00', 'YYYY-MM-DD hh24:mi:ss')
t
Interesting. Yeah, I don't see why that wouldn't work.
a
Awesome! And just figured I could join with InventoryItemLocations to get the latest qty available. I think I'm all set. Thank you again! Couldn't have done it without your extremely valuable blog
t
Glad I could help! Let me know if it really does work. I love simple solutions to what initially appear to be complex problems.
a
Seems to work based on my tests so far