Inventory Batch Expiry Date in Inventory On-Hand form

Hi Friends,

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 .



TransDate expiryDate;

InventBatchId inventBatchId;

inventBatchId = InventDim::find(this.InventDimId).inventBatchId;

expiryDate = InventBatch::find(inventBatchId,this.ItemId).expDate;

return expiryDate?expiryDate:dateNull();


But It not fetching any data Always shows as empty in the grid.

Suggestions and solutions are welcome.

Thanks and Regards


display TransDate batchExpiryDate()