Skip to main content
Question

Trying to add field to screen on Self Service Portal in 26R1 MUI

  • Oct 31, 2026 5:50 PM UTC
  • 2 replies
  • 22 views
  • Translate All

Joe Schmucker
Captain II
Forum|alt.badge.img+3

I am trying to add the CustomerRefNbr field to the Orders screen (SP504010) here:

I’ve tried a LOT of different things.  The .ts file compiles without any complaints but the field does not show.  I’m not good at this, so hopefully I’m just making a s-t-u-p-i-d mistake.

I think the source code I am trying to extend is "src/screens/SP/order/view-models"

I think I should be adding the field to the PXView on that file.

Here is my .ts code.  If anyone see’s anything, let me know!

import {
PXFieldState,
PXView,
readOnly,
} from "client-controls";
import { AllOrdersLine, OpenOrdersLine, OrdersLine } from "src/screens/SP/order/view-models";

export interface SP504010_OrdersLine extends OrdersLine { }

export class SP504010_OrdersLine extends PXView {
@readOnly CustomerRefNbr: PXFieldState;
}

export interface SP504010_AllOrdersLine extends AllOrdersLine { }

export class SP504010_AllOrdersLine extends OrdersLine {
}

export class SP504010_OpenOrdersLine extends OpenOrdersLine {
}

 

2 replies

Forum|alt.badge.img+8
  • Jr Varsity III
  • Oct 31, 2026 6:01 PM UTC

Hi ​@Joe Schmucker ,

Can you try below,

In addition make sure field is not hidden-

 

import { PXFieldState, readOnly } from "client-controls";
import { SP504010 } from "src/screens/SP/SP504010/SP504010";
import { AllOrdersLine, OpenOrdersLine, OrdersLine } from "src/screens/SP/order/view-models";

// Screen extension (required, even though it's empty)
export interface SP504010_CustRef extends SP504010 { }
export class SP504010_CustRef { }

// View extensions: the class does NOT extend anything
export interface SP504010_OrdersLine extends OrdersLine { }
export class SP504010_OrdersLine {
    @readOnly CustomerRefNbr: PXFieldState;
}

export interface SP504010_AllOrdersLine extends AllOrdersLine { }
export class SP504010_AllOrdersLine {
    @readOnly CustomerRefNbr: PXFieldState;
}

export interface SP504010_OpenOrdersLine extends OpenOrdersLine { }
export class SP504010_OpenOrdersLine {
    @readOnly CustomerRefNbr: PXFieldState;
}

Translate

JKurtz29
Semi-Pro I
Forum|alt.badge.img+1
  • Semi-Pro I
  • Oct 31, 2026 6:08 PM UTC

Do you need to create the corresponding .html template file to add the field to the screen?

Something like this to inject the field into the  url="../order/order.html" template that’s being included by the page’s html.

<template>
<field append="#unpaidfsOpenOrderA1" name="CustomerRefNbr"></field>
</template>

 

Translate