Hi Smit,
I assume the return of the lookup is a location ID? As the number of locations could influence the performance, you can try several options to see what performs the best:
- Temporary table (start with a form based lookup)
- Use WMS location as source and use display methods for calculating the on-hand