Hi, All. How can I get the Quantity Available valu...
# suitescript
x
Hi, All. How can I get the Quantity Available value on the SalesOrder record for each item by Script?
b
learn how to make a saved search or dataset to get that information
then use N/search or N/query to replicate that in script
🤖 1
w
@battk do you never sleep?
wow 1
x
🙂
Yes, I have a little experience in Saved Search. But, I couldn't find the filter name for quantity available.
w
I'm just guessing here, but maybe you need to look in the item table for quantityavailable?
b
you want either available or location available
you probably want to see how those columns look like so you understand the difference
x
Now, I am trying to search all SalesOrder records if the Item Quantity > Item Quantity Available
b
@Watz i make sure to mix up my response hours so nobody can tell what timezone i live in
lmfao 4
w
Haha, sneaky
b
@XueDong Mei thats pretty unusual. Committed items on a sales order are already accounted for in the quantity available
x
But, the Quantity Available value wouldn't be changed on that SalesOrder.
right?
b
are the items on the sales order committed?
x
yes
b
their quantity has already been subtracted from the quantity available then
x
By the way, how can I get that quantity available value in search?
what is the field id?
b
did you find the available column?
or location available?
x
Quantity Available
b
what search type are you searching?
x
on SalesOrder
I know that I can get it on item
but, I need to get it on SalesOrder.
b
easiest will be doing an item search
you can do it from a transaction search, but you have to use the item join
w
Isn't the sales order form just showing the "available" from the item record? I.e it will be the same for all sales orders
x
when I use item join, what is the field id?
that is what I want to know
b
general strategy should be to make the search you want in the ui
x
Yes, In the UI
b
then load it in code to see what the filters and columns look like
x
what is the Name of quantity available?
I couldn't find any field after join to Item field...
b
there isnt, i told you the 2 available options
neither is likely to be named quantity available
s
@Watz let's be honest, battk is an AI that lives in the interwebs section like Tron serving as an Overlord for suitescript
w
I've heard rumors that he is a bot.
🤖 1
s
or i think battk is called battk becuse it's 5 people with acronyms of the first letter of their first names on the same account i.e Mr.B, Mr.A, Mr.T1, Mr.T2, and Mr.K
🤣 1
therefore its battk
LOL
🤣 1