I'm trying to make the Subaccount (SubID) field editable on the Journal Transactions screen (GL301000), regardless of the Batch Module (GL, AR, AP, etc.) or the Batch Status (Balanced, Released, etc.).

My goal is to have the Subaccount field always enabled so that users can modify it.
I first tried the following graph extension:
using PX.Data;
using PX.Objects.GL;
namespace EnableSubaccount
{
public class JournalEntry_Extension : PXGraphExtension<JournalEntry>
{
protected virtual void _(Events.RowSelected<GLTran> e, PXRowSelected del)
{
del?.Invoke(e.Cache, e.Args);
if (e.Row == null)
return;
// Make the detail cache editable
Base.GLTranModuleBatNbr.AllowUpdate = true;
Base.GLTranModuleBatNbr.Cache.AllowUpdate = true;
// Enable only the Subaccount field
PXUIFieldAttribute.SetEnabled<GLTran.subID>(
e.Cache,
e.Row,
true);
}
}
}Since that didn't work, I also tried this simpler version:
using PX.Data;
using PX.Objects.GL;
namespace EnableSubaccount
{
public class JournalEntry_Extension : PXGraphExtension<JournalEntry>
{
protected void _(Events.RowSelected<GLTran> e)
{
if (e.Row == null)
return;
PXUIFieldAttribute.SetEnabled<GLTran.subID>(
e.Cache,
e.Row,
true);
}
}
}However, the Subaccount field remains disabled in all cases.
Any guidance or recommended approach would be greatly appreciated.
