Loading ...

Screen Class in TS

import {

            PXView, createSingle, PXFieldState, graphInfo, group, PXScreen, createCollection, PXFieldOptions, PXActionState

} from "client-controls";

 

@graphInfo({ graphType: 'PX.Objects.GL.AccountHistoryEnq', primaryView: 'Filter' })

 

export class GL401000 extends PXScreen {

}

The screen class must satisfy the following  requirements:

-       It has the screen ID as the name of the class, such as GL401000

-       It extends the PXScreen class

-       It has the graphInfo decorator, in which you specify the graph and primary view of the graph

-       It must be placed in the file with the name [screenID].ts. Example GL401000.ts

 

export class GL401000 extends PXScreen {

@viewInfo({containerName: "Filter"})

            Filter = createSingle(GLHistoryEnqFilter);

}

 

In the screen class, you define a property for each data view. This property must satisfy the following requirements:

-       It has the same name as the name of data view. Example
Filter = createSingle(GLHistoryEnqFilter). Filter property should be the same name for Filter view

-       If you need to display a form control, the property is initialized with the createSingle method

-       If you need to display a grid or a tree, the property is initialized with the createCollection method. You can specify configuration parameters for the table by using the gridConfig decorator and for the tree by using the treeConfeg decorator

  •       It can have the viewInfo decorator with the specified container name

 

-       In the TS file of the form, for each view of the graph you define a view class - that is a class of each view of the graph

-       The class extends the PXView class

 

-       In each view class you specify the properties for all data fields of the data view that you want to be able to show of use in the UI

-       You use the name of the data field as the property name

-       For each property you specify the type of the property which can be one of the following:

- PXFieldState

- PXFieldState<listOfOptions> where you specify the options by using the PXFieldOptions enum. The options can be combined

Unlock the Full Potential of Acumatica with Custom Development

Acumatica's flexibility allows for tailored solutions that meet your unique business needs. If you’re looking to enhance your ERP system with custom screens, views, or data handling, our expert developers can help.

Request a Customization Today! 

Whether it’s refining your data views, optimizing UI elements, or implementing new business logic, we’ll ensure seamless integration with your Acumatica environment. Leave your request now and let’s build the perfect solution together!

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5