Display Actual Quantity in Purchase Order

I want to display the actual quantity of the item when the item is selected while creating the purchase order. I have created a custom field in the Purchase Order Item doc type.
How do I retrieve the actual quantity for the item

@Sri It gets tricky now since one Item can be stored in multiple warehouses… Do you want to fetch the total quantity of Item from all Warehouses or specific Warehouse which you are including as Target Warehouse in the PO?

Jai - Good question.
I am looking at the quantity from all warehouses.

@Sri You can delve into custom scripts to accomplish this… let us know how it goes :wink:

Can you please provide more inputs on custom scripts and how I can go about it