In Inventory OnHand form I want the Inventory Batch expiry date for the particular Item when the Item having Batch Number as the Tracking Dimension .I want this as the last field in the overview grid. I wrote the following code as the display method in the InventSum Table .
this.InventDimId, will not be having the value every time(as the inventSum data is summed up and shown based on the chosen dimensions from the dimension display). Rather take the inventDim buffer, it will have the selected dimensions (if you chose to display the batch number).
Look at the method \Forms\InventOnhandItem\Data Sources\InventSum\Methods\averageCostPriceUnit
I think you already have the expiration date on the Onhand tab.