Skip to main content
Question

How to Remove UOM Display from Add Matrix Item Grid in Modern UI (SO301000)

  • August 11, 2026
  • 10 replies
  • 112 views

 Hi Team

In the Sales Order screen (SO301000), we have the Add Matrix Item popup, where the grid displays the quantity along with the UOM (for example, 10 EA).

In the Classic UI, this UOM display was removed in the aspx.cs file using the existing SetUOMFormat logic.

I’m trying to achieve the same behavior in the Modern UI. I found that the relevant logic appears to be in the SO301000_AddMatrixItems TypeScript file, specifically within matrix-grid-manager.

However, I am unable to extend or override this file from the development folder.

I’ve shared the relevant base code files below for reference.

import {
  IGridColumn,
  handleEvent,
  CustomEventType,
  RowCssHandlerArgs,
  CellCssHandlerArgs,
  PXViewCollection,
  QpGridEventArgs,

} from "client-controls";

import { AddMatrixItemsBase, EntryMatrix } from "../../../IN/common/matrix-items/panel-add-matrix-items/panel-add-matrix-items";import { SO301000 } from "../SO301000";import { MatrixGridManager } from "./../../../IN/common/matrix-items/matrix-grid-manager";

export interface SO301000_AddMatrixItems extends SO301000, AddMatrixItemsBase { }export class SO301000_AddMatrixItems extends AddMatrixItemsBase {

  public AdditionalAttributesOnFilterColumns(column: IGridColumn) {
    return MatrixGridManager.AdditionalAttributesFilterColumns(column);
  }
  public MatrixOnFilterColumns(column: IGridColumn) {
    return MatrixGridManager.MatrixFilterColumns(column);
  }
  public MatrixOnColumnsGenerated(columns: IGridColumn[]) {
    return MatrixGridManager.MatrixColumnsGenerated(columns);
  }
  public MatrixItemsOnFilterColumns(column: IGridColumn) {
    return MatrixGridManager.MatrixItemsFilterColumns(column);
  }

  public MatrixItemsOnColumnsGenerated(columns: IGridColumn[]) {
    return MatrixGridManager.MatrixItemsColumnsGenerated(columns);
  }

  @handleEvent(CustomEventType.GetRowCss, { view: "Matrix" })
  public getMatrixRowCss(args: RowCssHandlerArgs<PXViewCollection<EntryMatrix>>) {
    return MatrixGridManager.GetRowCss(args?.selector?.row);
  }

  @handleEvent(CustomEventType.GetCellCss, { view: "Matrix", column: MatrixGridManager.ExtraColumn })
  public getMatrixCellCss(args: CellCssHandlerArgs) {
    return MatrixGridManager.GetCellCss(args?.selector?.row, MatrixGridManager.ExtraColumn);
  }

  public onGetMatrixCellText(args: QpGridEventArgs) {
    return MatrixGridManager.GetMatrixCellText(args.activeColumn?.field, args.activeRow?.cells, args.activeCell?.cellText);
  }

  public onMatrixCellChanged(args: any) {
    if (this.Header.ShowAvailable.value === true) {
      MatrixGridManager.SetColumnName(this.screenService, args.activeColumn?.field);
    }
  }
}

import {
IGridColumn,
GridCell,
GridColumnDisplayMode,
ScreenService,
ServerCommand,
} from "client-controls";

export class MatrixGridManager {
public static readonly ExtraColumn = "Extra";
public static readonly AttributeValueTemplate = "AttributeValue";
private static readonly BaseUOMField = "BaseUOM";
private static readonly UOMsField = "UOMs";
private static readonly MatrixFields = ["RowAttributeValueDescr", this.ExtraColumn];
private static readonly MatrixItemsFields = [
"UOM",
"Qty",
"InventoryCD",
"Descr",
"New",
"StkItem",
"BasePrice",
"ItemClassID",
"TaxCategoryID"
];
private static readonly AttributesPlaceholderField = "AttributeValue0";
private static readonly FilesKey = "Files";
private static readonly NotesKey = "Notes";
private static matrixGridOldColumnName = null;

public static AdditionalAttributesFilterColumns(column: IGridColumn) {
column.commitChanges = true;
column.displayMode = GridColumnDisplayMode.Text;
column.hideViewLink = true;
return column.field !== MatrixGridManager.ExtraColumn;
}

public static MatrixFilterColumns(column: IGridColumn) {
column.commitChanges = true;
return column.field !== undefined &&
(column.field.startsWith(MatrixGridManager.AttributeValueTemplate) ||
MatrixGridManager.MatrixFields.includes(column.field));
}

public static MatrixColumnsGenerated(columns: IGridColumn[]) {
const totalIndex = columns.findIndex(v => v.field === MatrixGridManager.ExtraColumn);
if (totalIndex >= 0) {
columns.push(columns.splice(totalIndex, 1)[0]);
}
}

public static MatrixItemsFilterColumns(column: IGridColumn) {
column.commitChanges = true;
return column.field !== undefined &&
(column.field.startsWith(MatrixGridManager.AttributeValueTemplate) ||
MatrixGridManager.MatrixItemsFields.includes(column.field)) ||
column.generated === true &&
(column.key === this.FilesKey || column.key === this.NotesKey);
}

public static MatrixItemsColumnsGenerated(columns: IGridColumn[]) {
let templateFieldIndex = 0;
let columnCounter = 0;

for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
const column = columns[columnIndex];

if (column.field === MatrixGridManager.AttributesPlaceholderField) {
templateFieldIndex = columnIndex;
}

if (column.field !== undefined &&
column.field.startsWith(MatrixGridManager.AttributeValueTemplate)) {
column.hideViewLink = true;
columns.splice(columnIndex, 1);
columns.splice(templateFieldIndex + columnCounter++, 0, column);
}
}
}

public static GetRowCss(row) {
if (row?.IsTotal?.value === true) {
return "bold-row";
}
return undefined;
}

public static GetCellCss(row, column: string) {
if (column === MatrixGridManager.ExtraColumn) {
return "bold-row";
}
return undefined;
}

public static SetColumnName(screenService: ScreenService, columnName: string) {
if (!columnName || columnName === MatrixGridManager.matrixGridOldColumnName) return;

screenService.executeCommand(
new ServerCommand("MatrixGridCellChanged", [columnName])
);

MatrixGridManager.matrixGridOldColumnName = columnName;
}

public static GetMatrixCellText(
fieldName: string,
cells: { [k: string]: GridCell },
defaultText: string
): string {
if (
fieldName === undefined ||
fieldName == null ||
fieldName === "" ||
cells === undefined ||
cells == null ||
defaultText === undefined ||
defaultText == null ||
defaultText === ""
) {
return undefined;
}

let uom: string = undefined;
const isTotalField = fieldName === MatrixGridManager.ExtraColumn;

if (isTotalField) {
uom = cells[MatrixGridManager.BaseUOMField].value;
}

const attributeNumber = this.getAttributeNumber(fieldName);

if (attributeNumber !== undefined) {
uom = cells[MatrixGridManager.UOMsField].value[attributeNumber];
}

if (uom !== undefined) {
return `${defaultText} ${uom}`;
}

return undefined;
}

protected static getAttributeNumber(fieldName: string): number {
if (
fieldName === undefined ||
!fieldName.startsWith(MatrixGridManager.AttributeValueTemplate)
) {
return undefined;
}

const attributeNumber = fieldName.substring(
MatrixGridManager.AttributeValueTemplate.length
);

if (
attributeNumber === undefined ||
attributeNumber == null ||
attributeNumber === ""
) {
return undefined;
}

const value = parseInt(attributeNumber, 10);

if (isNaN(value)) {
return undefined;
}

return value;
}
}

The below code which i have extended and tried!

import { QpGridEventArgs } from "client-controls";
import { SO301000_AddMatrixItems } from "src/screens/SO/SO301000/extensions/SO301000_AddMatrixItems";

export interface SO301000_AddMatrixItems_Extension extends SO301000_AddMatrixItems { }
export class SO301000_AddMatrixItems_Extension extends SO301000_AddMatrixItems {
public onGetMatrixCellText(args: QpGridEventArgs): string {
return args?.activeCell?.cellText ?? "";
}
}

Could someone please advise on the recommended approach for extending or customizing this logic in the Modern UI?

10 replies

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • August 11, 2026


Hi ​@vkumar68 ,

1. Try returning undefined instead of an empty string.

Looking at the base GetMatrixCellText, every "don't change anything" path returns undefined — that's the framework's signal to use the grid's default text. So the override should just be:

        public onGetMatrixCellText(args: QpGridEventArgs): string {
        return undefined;
        }

Returning "" may blank the cell rather than leave it alone. If undefined still shows "10 EA", then the override isn't executing at all, and the problem is registration rather than logic.

2. It may be easier to fix this server-side.

The UOM isn't invented on the client — it comes from data the server sends:

     uom = cells["BaseUOM"].value;
     uom = cells["UOMs"].value[attributeNumber];

If BaseUOM and UOMs are empty, uom stays undefined, the method returns undefined, and you get the quantity with no UOM — no TypeScript needed.

You could blank those fields in a graph extension on the matrix panel. Use Inspect Element on the popup grid to find the exact view and DAC. Just check first whether those fields are used elsewhere in the popup before clearing them.

I'd lean toward this option since DAC/graph names are far more stable across versions than the Modern UI TypeScript layer.

3. On the extension not working

SO301000_AddMatrixItems is a panel class, not the main screen class. Extending nested panel classes may need different registration than extending SO301000 itself, which could be why it isn't picking up. Worth confirming with a support case whether panel-class extension is supported in 2026 R1 before spending more time on it.

Hope that helps.


Forum|alt.badge.img+3
  • Captain II
  • August 11, 2026

The main issue is that MatrixGridManager.GetMatrixCellText() is a static method, so extending MatrixGridManager will not override the existing call.

Your approach should be to extend SO301000_AddMatrixItems and override/register the cell-text event so that it returns the original cell text without appending the UOM.

Your logic is correct:

public onGetMatrixCellText(args: QpGridEventArgs): string {
    return args?.activeCell?.cellText ?? "";
}

Also, import the base class from the original screen file, not from the extensions folder:

import { SO301000_AddMatrixItems }
    from "src/screens/SO/SO301000/SO301000_AddMatrixItems";


  • Author
  • Freshman I
  • August 11, 2026

@jinin ​@FarhanaM60 

Thanks for you Inputs

I tried the above approaches. I understand that MatrixGridManager.GetMatrixCellText() is static, so extending MatrixGridManager would not override the existing call. I therefore tried extending SO301000_AddMatrixItems and overriding onGetMatrixCellText() to return the original cell text:

public onGetMatrixCellText(args: QpGridEventArgs): string {
    return args?.activeCell?.cellText ?? "";
}

I also tried the undefined approach, but our base method/interface expects a string return type, so returning undefined results in a TypeScript compatibility error.

One other point I noticed: in our 26R1 source, SO301000_AddMatrixItems.ts is located under:

src/screens/SO/SO301000/extensions/SO301000_AddMatrixItems.ts

It is not available directly under src/screens/SO/SO301000/ as suggested.

At this point, I’m still unable to get the required behavior (10 EA10) through the Modern UI extension. Could you please confirm the complete supported approach for 26R1, including the correct way to extend/register the SO301000_AddMatrixItems panel? If panel extension is not supported, please advise the recommended alternative without modifying the base Acumatica code.


Forum|alt.badge.img+3
  • Captain II
  • August 11, 2026

Thanks for the clarification. I understand now that in 26R1 the SO301000_AddMatrixItems panel is itself provided as a built-in Modern UI extension under the extensions folder. My requirement is specifically to change the existing onGetMatrixCellText() behavior, which currently delegates to the static MatrixGridManager.GetMatrixCellText() and appends the UOM.

Since overriding the method from another extension does not replace the existing handler, could you please confirm whether this built-in panel extension supports further extension/handler replacement in 26R1? If not, is there a supported alternative for changing the displayed cell text without modifying the Acumatica base SO301000_AddMatrixItems.ts or MatrixGridManager.ts?


  • Author
  • Freshman I
  • August 11, 2026

Thanks ​@FarhanaM60 , that clarifies the issue. Yes, my requirement is only to change the displayed cell text from 10 EA to 10; I don't want to modify the underlying UOM or quantity.

I have tried extending SO301000_AddMatrixItems and overriding onGetMatrixCellText(), but the Base handler is still being used.

Could you please confirm whether this built-in SO301000_AddMatrixItems extension supports further extension/handler replacement in 26R1? If not, what is the supported approach or extension point to achieve this without modifying the base SO301000_AddMatrixItems.ts or MatrixGridManager.ts?

A small working example for this specific scenario would be very helpful.


Forum|alt.badge.img+3
  • Captain II
  • August 11, 2026

Sure. The requirement is only to change the display text, so the intended customization would be:

import { QpGridEventArgs } from "client-controls";
import { SO301000_AddMatrixItems }
    from "src/screens/SO/SO301000/extensions/SO301000_AddMatrixItems";

export interface SO301000_AddMatrixItems_Ext
    extends SO301000_AddMatrixItems { }

export class SO301000_AddMatrixItems_Ext
    extends SO301000_AddMatrixItems
{
    public onGetMatrixCellText(args: QpGridEventArgs): string {
        return args?.activeCell?.cellText ?? "";
    }
}


However, in 26R1 the original SO301000_AddMatrixItems already defines onGetMatrixCellText(), and the original handler continues to execute. Therefore, this class override does not replace the existing handler in my testing.

The base implementation calls:

MatrixGridManager.GetMatrixCellText(...)

Thanks for asking. I came across this approach that may help with the requirement. I haven’t personally tested it yet in 26R1, so I can’t confirm that it will work as-is, but I wanted to share it as a possible direction for handling the onGetMatrixCellText() behavior without modifying the base files.


  • Author
  • Freshman I
  • August 13, 2026

Hi  ​@RohitRattan88 , could you please help me with the above requirement?
Is it possible to extend this file in the Acumatica Modern UI?


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+5
  • Acumatica Moderator
  • August 13, 2026

  • Author
  • Freshman I
  • August 13, 2026

Hi ​@RohitRattan88 , thanks for sharing the thread. I reviewed it, but I’m still not clear how to apply that approach to my specific case.
Could you please help me with the exact approach for SO301000_AddMatrixItems? I’m trying to change the displayed quantity from 10 EA to 10 without modifying the base Acumatica files.

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+5
  • Acumatica Moderator
  • August 13, 2026

@vkumar68 

You could try returning undefined on onGetMatrixCellText method, as it seems to add UOM to text value:

export interface SO301000_ExtensionName extends SO301000 { }
export class SO301000_ExtensionName {

public onGetMatrixCellText(args: QpGridEventArgs) {
return undefined;
}
}

 See if this helps