im a little new to using the search model my goal...
# suitescript
s
im a little new to using the search model my goal is to filtwe by internal id and get back teh avilbaile lot numbers and qty
Copy code
var itemSearch = search.create({
            type: search.Type.INVENTORY_ITEM,
            title: "Inventory_Item_Search",
            id: "customsearch_inventory_item_search",
            columns: ["internalid", "itemid"],
            filters: ["internalid", "is", skuId],
          });
          var resultSet = itemSearch.run();
@battk a while back you gave some help on this (cant search slack for it)
b
the usual advice is to make the search in the ui first
s
im trying to get available lot numbers and qty for a items internal id
b
did you make the search in the ui yet?
s
yes
b
load that search in the debugger so you can inspect its columns
s
on the result page its givng me all lots that ever exsisted
b
that doesnt sounds like your search is correct
s
probally is not
message has been deleted
b
you should be adding a filter to limit it to only lots with quantity available
s
i thought is on hand does that
b
you can have quantity on hand yet have no quantity available
s
that i know in the search is under inventory detail ?
netsuite naming in saved search doiesnt match the ui alaways
b
its unlikely that you actually want to be using inventory detail in your criteria
inventory detail is from transactions
inventory numbers are what the inventory detail modify
i was more interested in the columns, but its unlikely that you could get a functioning search using inventory details
s
ok got the search working any specifc result outcome ?
b
the idea is to get your search functioning in the ui
and then either copy it in code
or load the search in code and add additional filters to it
s
And the result I would need to call get value on it ?
b
yes