https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
a

Alan Fitch

04/27/2022, 6:18 PM
What's the fastest way to get an item's inventory by bin and lot with SuiteScript?
b

battk

04/27/2022, 6:56 PM
probably a query for the inventory balance
search is probably comparable
a

Alan Fitch

04/27/2022, 6:58 PM
Can I do an Inventory Balance search in suitescript?
b

battk

04/27/2022, 6:58 PM
yes
t

tdietrich

04/27/2022, 8:01 PM
Will this work?
Copy code
SELECT
	Bin AS BinID,
	BUILTIN.DF( Bin ) AS BinName,
	OnHand
FROM
	ItemBinQuantity
WHERE
	Item = 151
ORDER BY
	BUILTIN.DF( Bin )
a

Alan Fitch

04/27/2022, 8:02 PM
I wish.. I need the lot and the bin.
t

tdietrich

04/27/2022, 8:11 PM
Have you looked at the InventoryNumberLocation table?
Actually, I guess that doesn't get you to the bin.
Seems like a SuiteQL "blind spot."
b

battk

04/27/2022, 8:30 PM
use the InventoryBalance table
a

Alan Fitch

04/27/2022, 8:35 PM
AMAZING! Is this new?