Skip to main content
Solved

Adding a new Field with Pick List/Selector


I want to add a new field that will allow me to pick a list of employees or users. Or that will allow me to link to an attribute that I already have with employee names. 

I have added the field already thru customization, but am stuck trying to figure out the pick list. 

Am I doing it correctly? 

My main goal is to put a pick list of employee on my project quote screen, so that I can then view it on the inquiry screen as a column and create reports. 

Any help or direction would be greatly appreciated! 

Thanks

 

Best answer by davidnavasardyan

Hi ​@jpaulin ,

Here’s one approach you can take to add an Employee lookup on your screen:

 


[PXDBInt()]
[PXDimensionSelector("BIZACCT", 
    typeof(EPEmployee.bAccountID), 
    typeof(EPEmployee.acctCD), 
    DescriptionField = typeof(EPEmployee.acctName))]
[PXUIField(DisplayName = "Employee")]
public virtual int? EmployeeID { get; set; }
public abstract class employeeID : PX.Data.BQL.BqlInt.Field<employeeID> { }

With this, you’ll be able to select and store an Employee, display it in inquiries, and include it in any reports you build. Good luck!

View original
Did this topic help you find an answer to your question?

3 replies

davidnavasardyan
Jr Varsity I
Forum|alt.badge.img+2

Hi ​@jpaulin ,

Here’s one approach you can take to add an Employee lookup on your screen:

 


[PXDBInt()]
[PXDimensionSelector("BIZACCT", 
    typeof(EPEmployee.bAccountID), 
    typeof(EPEmployee.acctCD), 
    DescriptionField = typeof(EPEmployee.acctName))]
[PXUIField(DisplayName = "Employee")]
public virtual int? EmployeeID { get; set; }
public abstract class employeeID : PX.Data.BQL.BqlInt.Field<employeeID> { }

With this, you’ll be able to select and store an Employee, display it in inquiries, and include it in any reports you build. Good luck!


Forum|alt.badge.img+8
  • Captain II
  • 366 replies
  • March 12, 2025

HI ​@jpaulin 

 

Another way you can add a selector is using the [PX.TM.Owner]

 

Aleks


Reno Roy Sorima
Freshman I

You can also use PXEPEmployeeSelectorAttribute to define a Selector for Employees.

#region Employee
public abstract class employee : BqlInt.Field<employee> { }
[PXDBInt]
[PXUIField(DisplayName = "Employee")]
[PXEPEmployeeSelector]
public virtual int? Employee { get; set; }
#endregion


Good Luck.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings