Skip to main content
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 oname='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 ename='BranchID']" name = "UsrRelatedRequisitionCD" config-allow-edit.bind="true" ></field>
</template>

 

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

Have you published the customization project or built the frontend?


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


@ron where do you have these files?

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


Yes all 4 of them under extensions in PO301000


@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.


Reply