Today is very small tip. Today is Eid day, Very warm wishes for Eid holidays.
Here is code snippet for on hand inventory method. I wrote with extension.
For for extension. create a new class and add attribute on Extension fo Class.
[ExtensionOf(tableStr(PurchLine))]public static class PurchLine_Extension{[SysClientCacheDataMethodAttribute(true)] //This attribute will cache your display method.public static display Real MYOnHand( PurchLine _this){InventOnHand inventOnhand;InventDim InventDim;InventDimParm inventDimParm;inventDimParm.initFromInventDim(_this.inventDim());inventOnHand = InventOnhand::newParameters(_this.Itemid,_this.InventDim(),inventDimParm);return inventOnHand.availPhysical();}}