Skip to main content
Question

Custom Field with CommitChanges in Modern UI breaks Grid Copy & Paste functionality

  • March 18, 2026
  • 1 reply
  • 34 views

Forum|alt.badge.img

Hi everyone,

I'm facing an issue where adding a custom Decimal field to a grid breaks the standard Copy and Paste functionality in Acumatica. The "Paste" action either fails completely or only updates the first row of the grid.(This only happens in Modern UI)

DAC: 

using PX.Data.BQL;
using PX.Data.EP;
using PX.Data;
using PX.Objects.CN.ProjectAccounting.Descriptor;
using PX.Objects.CS;
using PX.Objects.IN;
using PX.Objects.PM;
using PX.Objects.TX;
using PX.Objects;
using System.Collections.Generic;
using System;

namespace MultipleProject
{
public class PMQuoteTaskExt : PXCacheExtension<PX.Objects.PM.PMQuoteTask>
{
#region UsrSortOrder
[PXDBInt]
[PXUIField(DisplayName = "Sort Order")]
public virtual int? UsrSortOrder { get; set; }
public abstract class usrSortOrder : PX.Data.BQL.BqlInt.Field<usrSortOrder> { }
#endregion

#region UsrQty

[PXDBDecimal(2)]
[PXDefault(TypeCode.Decimal, "1.0")]
[PXUIField(DisplayName = "Quantity")]
public virtual Decimal? UsrQty { get; set; }
public abstract class usrQty : PX.Data.BQL.BqlDecimal.Field<usrQty> { }
#endregion

#region UsrUOM
[PXDBString(6, IsUnicode = true, InputMask = ">CCCCCC")]
[PXUIField(DisplayName = "UOM")]
[PXSelector(typeof(Search4<INUnit.fromUnit, Aggregate<GroupBy<INUnit.fromUnit>>>),
typeof(INUnit.fromUnit))]

public virtual string UsrUOM { get; set; }
public abstract class usrUOM : PX.Data.BQL.BqlString.Field<usrUOM> { }
#endregion

#region UsrUnitRate
[PXDBDecimal(2)]
[PXDefault(TypeCode.Decimal, "0.0")]
[PXUIField(DisplayName = "Unit Rate", Enabled = false)]

public virtual Decimal? UsrUnitRate { get; set; }
public abstract class usrUnitRate : PX.Data.BQL.BqlDecimal.Field<usrUnitRate> { }
#endregion

#region UsrTotal
[PXDBDecimal(2)]
[PXDefault(TypeCode.Decimal, "0.0")]
[PXUIField(DisplayName = "Total", Enabled = false)]

public virtual Decimal? UsrTotal { get; set; }
public abstract class usrTotal : PX.Data.BQL.BqlDecimal.Field<usrTotal> { }
#endregion
}
}

TS:

import { Messages as SysMessages } from "client-controls/services/messages";
import { PXFieldState,gridConfig,GridFastFilterVisibility,GridPreset,columnConfig,PXFieldOptions } from "client-controls";
import { PM304500 } from "src/screens/PM/PM304500/PM304500";
import { Quote,Tasks } from "src/screens/PM/PM304500/views";

export interface PM304500_Ext extends PM304500 {}
export class PM304500_Ext {}

export interface Quote_Ext extends Quote {}
export class Quote_Ext {

UsrEmergencyResponse : PXFieldState;
UsrCustomerPriceClass : PXFieldState;
UsrSkipPMApproval : PXFieldState;
UsrScope : PXFieldState<PXFieldOptions.Multiline>;
UsrAssumptions : PXFieldState<PXFieldOptions.Multiline>;
}

export interface Tasks_Ext extends Tasks {}
export class Tasks_Ext {

@columnConfig({width: 70}) UsrSortOrder : PXFieldState;
@columnConfig({width: 100}) UsrQty : PXFieldState<PXFieldOptions.CommitChanges>;
@columnConfig({width: 72}) UsrUOM : PXFieldState;
@columnConfig({width: 100}) UsrUnitRate : PXFieldState<PXFieldOptions.Disabled>;
@columnConfig({width: 100}) UsrTotal : PXFieldState<PXFieldOptions.Disabled>;

}

Even without logic in the graph, this fails, just by having these fields in TS and DAC.

1 reply

kbibelhausen
Freshman I
  • Freshman I
  • March 20, 2026

The issue you're experiencing is a known behavior difference between Classic and Modern UI. When you add `CommitChanges` to a custom field in a Modern UI grid, it can interfere with the grid's copy and paste functionality because the field continuously commits changes to the server, disrupting the client-side operations needed for clipboard interactions.

 

Here's how to resolve this:

 

**Option 1: Remove CommitChanges (Recommended)**

Remove the `PXFieldOptions.CommitChanges` from your custom field definition in TypeScript:

 

```typescript

// Instead of this:

UsrCustomField: PXFieldState;

 

// Use this:

UsrCustomField: PXFieldState;

```

 

**Option 2: Use Field Events Instead**

If you need the CommitChanges behavior for business logic, replace it with field events in your graph extension:

 

```csharp

[PXOverride]

public virtual void _(Events.FieldUpdated e)

{

// Your logic here that was triggered by CommitChanges

base._(e);

}

```

 

**Option 3: Conditional CommitChanges**

If you absolutely must keep CommitChanges, consider making it conditional based on the operation context, though this is more complex and not recommended for most scenarios.

 

The Modern UI handles field interactions differently than Classic UI, particularly around client-server communication. Copy and paste operations need to work primarily on the client side before committing to the server, which conflicts with fields that have CommitChanges enabled.

 

Test your grid's copy/paste functionality after removing CommitChanges - you should see normal behavior restored.

 

---

Drafted by AcuDev (AI) · Reviewed by Kevin Bibelhausen, Studio B

AcuOps — AI-powered environment management for Acumatica · b.studio