The requirement is to show the expiration date from inventory details in the packing slip. As there is no standard option to fetch the expiration date to print template, we have used the custom button to print packing slip. via script we can get the inventory detail subrecord fields.