There are many places inside the row selected for both APTran and APInvoice event that it enable/disables the field. Ensure you are calling the delegate in row selected first, before changing the state.
public class APInvoiceEntrySetSubIDEnabledExt : PXGraphExtension<APInvoiceEntry>
{
public virtual void _(Events.RowSelected<APTran> e, PXRowSelected del)
{
del?.Invoke(e.Cache, e.Args);
PXUIFieldAttribute.SetEnabled<APTran.subID>(e.Cache, e.Row, true);
}
public virtual void _(Events.RowSelected<APInvoice> e, PXRowSelected del)
{
del?.Invoke(e.Cache, e.Args);
PXUIFieldAttribute.SetEnabled<APTran.subID>(Base.Transactions.Cache, null, true);
}
}