Is there a way to create a search that would show ...
# suitescript
t
Is there a way to create a search that would show available to build on assembly items? I have 1000s of assembly items with negligible build times that I need real time stock levels. Whether or not it’s considered in stock is equal to what can be built. Items vary in depth and components but I need real time numbers rolled up to the top assembly. “In Stock - 4 Available” I can do it with a flattened search and a whole lot of JavaScript recursion but it feels like a stupid amount of overkill. Any thoughts?
b
You might be able to do it with a summary search
The basic idea is to group by assembly internal id
And have a column which calculates how many assemblies each component item can create if it was the only component
The minimum value of that column is how many assemblies you can make
if you want to be clever in a script, you can try abusing dynamic mode to create an assembly build and set the fields required to calculate the buildable quantity for each assembly item
t
I’ll give the summary a shot first. I haven’t done much with summary searches so maybe that’s what I’m missing. I have assemblies with assemblies as components, 3-4 levels deep so I’ll probably still need some scripting
b
well, hopefully their available and on hand quantities work
if this was kit items, you would not be able to do that since their quantities dont work in searches