Skip to main content
Question

How to Enable the Subaccount Field on the Journal Transactions Screen (GL301000)?

  • July 28, 2026
  • 4 replies
  • 54 views

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.

4 replies

  • Freshman I
  • July 28, 2026

Hi ​@Mido97,

You can try the below approach to make the SubID field editable on the Journal Transactions screen.

protected virtual void _(Events.RowSelected<GLTran> e, PXRowSelected del)
{
del?.Invoke(e.Cache, e.Args);

if (e.Row == null)
return;

Base.GLTranModuleBatNbr.AllowUpdate = true;
Base.GLTranModuleBatNbr.Cache.AllowUpdate = true;

PXUIFieldAttribute.SetReadOnly<GLTran.subID>(e.Cache, e.Row, false);
}

Hope this works. Thank you!


Forum|alt.badge.img+1
  • Pro I
  • July 28, 2026

PXUIFieldAttribute.SetEnabled<GLTran.subID>(..., true) alone is not enough on GL301000. The SubID field is controlled by the base JournalEntry logic, which re-evaluates the enabled state based on the batch status and module. As a result, any changes made in a RowSelected<GLTran> event are overridden by the framework.

 

Setting AllowUpdate = true on the cache or view also does not bypass this behavior.

 

In standard Acumatica, the Subaccount field is intentionally read-only once the transaction reaches certain states (and for transactions originating from other modules such as AP or AR). This is by design to preserve GL integrity.

 

 


Forum|alt.badge.img+3
  • Captain I
  • July 28, 2026

@Mido97 You can try something like the code below. Also, review the base RowSelected event implementation and adjust your customization accordingly. In the sample below, The base method is intentionally not called because calling it causes the fields to remain disabled

 

 [PXOverride]
public void GLTran_RowSelected(PXCache sender, PXRowSelectedEventArgs e,
Action<PXCache, PXRowSelectedEventArgs> baseMethod)
{
//baseMethod(sender, e); don't call baseMethod

GLTran tran = e.Row as GLTran;
if (tran == null) return;

Base.GLTranModuleBatNbr.Cache.SetAllEditPermissions(true);
foreach (string field in sender.Fields)
{
if (!string.Equals(field, nameof(GLTran.SubID), StringComparison.OrdinalIgnoreCase))
PXUIFieldAttribute.SetEnabled(sender, tran, field, false);
}
PXUIFieldAttribute.SetEnabled<GLTran.subID>(sender, tran, true);
}

Hope this helps.


Forum|alt.badge.img+2
  • Jr Varsity III
  • July 28, 2026

@Mido97  Hi,
 


This is one of those cases where the field looks like it should respond to SetEnabled in RowSelected, but doesn't — and the usual culprit is that GL301000's base graph controls Subaccount editability through FieldSelecting on the grid column (not just RowSelected), and FieldSelecting fires again on every grid refresh/render, after your RowSelected override has already run. So your SetEnabled(true) gets silently overwritten the next time the row is displayed.

Fix: override FieldSelecting and set ReturnState directly

 

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;

PXUIFieldAttribute.SetEnabled<GLTran.subID>(e.Cache, e.Row, true);
}

// This is the one that actually sticks for grid columns
protected virtual void _(Events.FieldSelecting<GLTran.subID> e)
{
if (e.Row == null) return;

if (e.ReturnState is PXFieldState state)
{
state.Enabled = true;
}
}
}
}

Keep both handlers — RowSelected covers the field when it's rendered outside the grid (e.g. in a form view context or other controls), FieldSelecting covers the grid cell itself, which is almost certainly what you're editing on GL301000.