Skip to main content
Answer

ModernUI fields not showing

  • May 9, 2025
  • 5 replies
  • 130 views

Forum|alt.badge.img
import {
    PXFieldState,
    PXFieldOptions,
    linkCommand,
    controlConfig,
} from "client-controls";
import { POOrder } from "src/screens/PO/PO301000/PO301000";


export interface POOrder_UsrSalesRepID extends POOrder { }

export class POOrder_UsrSalesRepID{
    UsrSalesRepID: PXFieldState<PXFieldOptions.CommitChanges>;

}

 

<template>

    <field after="#fsColumnB-Order [name='OwnerID']" name="UsrSalesRepID"></field>
</template>


This is my code. It doesnot show on the UI
But this other code  similar shows the field on the UI
 

import {
    PXFieldState,
    PXFieldOptions,
    linkCommand,
    controlConfig,
} from "client-controls";
import { POOrder } from "src/screens/PO/PO301000/PO301000";

export interface POOrder_Requisition extends POOrder { }

export class POOrder_Requisition{
    @controlConfig({allowEdit: true, })
    UsrRelatedRequisitionCD : PXFieldState<PXFieldOptions.CommitChanges | PXFieldOptions.Disabled>;
}

 

<template>
    <field after="#fsOrderInfo-Other [name='BranchID']" name = "UsrRelatedRequisitionCD" config-allow-edit.bind="true" ></field>
</template>

 

Best answer by Dmitrii Naumov

@ron I think the issue may be that you are trying to put this field in the header section of the document, which is bound to the POOrderHeader view, but you extend the POOrder view.

The other field works because you put it on one of the tabs of the document that is bound to the POOrder view.

5 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • May 9, 2025

At first glance I don’t see any issues with the code.

Have you published the customization project or built the frontend?


Forum|alt.badge.img
  • Author
  • Varsity I
  • May 9, 2025

I did the same npm run build-dev for both times, it worked first time and now it doesn't.
Do i need to add these files manually in the modern ui files on customization project because I see the files in Customization in frontend sources automatically gets updated when i run build-dev


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • May 9, 2025

@ron where do you have these files?

Are they in \FrontendSources\screen\src\screens\PO\PO301000\extensions ?


Forum|alt.badge.img
  • Author
  • Varsity I
  • May 9, 2025

Yes all 4 of them under extensions in PO301000


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • May 9, 2025

@ron I think the issue may be that you are trying to put this field in the header section of the document, which is bound to the POOrderHeader view, but you extend the POOrder view.

The other field works because you put it on one of the tabs of the document that is bound to the POOrder view.