Hello Community,
I have a customization created that is enabling the InTranSplit.expireDate field in the IN > Receipts screen on released documents. This allows me to update the expiration date on the table which works just fine. However, the lot\serial report pulls from INSiteLotSerial table which doesn’t update using this method. Is there something else I need to call to get this extra table updated or is it just a bad idea to update the expiration date this way? Should I instead create a processing screen that instead generates a copy of this receipt and one line to adjust it out and another to adjust it in with a new date?
public class INReceiptEntry_Extension : PXGraphExtension<PX.Objects.IN.INReceiptEntry>
{
#region Event Handlers
protected void INTranSplit_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
{
InvokeBaseHandler?.Invoke(cache, e);
var row = (INTranSplit)e.Row;
if (row != null)
{
Base.CurrentDocument.Cache.AllowUpdate = true;
Base.transactions.Cache.AllowUpdate = true;
Base.splits.Cache.AllowUpdate = true;
PXUIFieldAttribute.SetEnabled<INTranSplit.expireDate>(cache, row, true);
Base.transactions.Current.ExpireDate = row.ExpireDate;
Base.transactions.UpdateCurrent();
}
}
#endregion
}
Thanks,
Adam