Skip to main content
Answer

How to add an Employee selector field in projects screen?

  • August 13, 2025
  • 1 reply
  • 38 views

Forum|alt.badge.img

Hello all,

I am trying to add an employee selector field in Projects (PM301000) screen. below is the code that I had applied, but it doesnt work:

[PXSelector(typeof(Search<EPEmployee.bAccountID>),
            typeof(EPEmployee.bAccountID),
            typeof(EPEmployee.acctCD),
            typeof(EPEmployee.acctName),
            SubstituteKey = typeof(EPEmployee.acctName))]
[PXUIField(DisplayName="TestEmployee")]

Best answer by svwk05

@Harry 

Please try the code below, it will display the Employee selector.

 [PXDBInt]
[PXSelector(
    typeof(Search<EPEmployee.bAccountID>),
    typeof(EPEmployee.acctCD),        // Employee ID
    typeof(EPEmployee.acctName),      // Employee Name
    SubstituteKey = typeof(EPEmployee.acctCD),
    DescriptionField = typeof(EPEmployee.acctName)
)]
[PXUIField(DisplayName = "Test Employee")]
public virtual int? UsrTestEmployee { get; set; }
public abstract class usrTestEmployee : PX.Data.BQL.BqlInt.Field<usrTestEmployee> { }

Hope it helps!!!

1 reply

Forum|alt.badge.img+1
  • Semi-Pro III
  • Answer
  • August 13, 2025

@Harry 

Please try the code below, it will display the Employee selector.

 [PXDBInt]
[PXSelector(
    typeof(Search<EPEmployee.bAccountID>),
    typeof(EPEmployee.acctCD),        // Employee ID
    typeof(EPEmployee.acctName),      // Employee Name
    SubstituteKey = typeof(EPEmployee.acctCD),
    DescriptionField = typeof(EPEmployee.acctName)
)]
[PXUIField(DisplayName = "Test Employee")]
public virtual int? UsrTestEmployee { get; set; }
public abstract class usrTestEmployee : PX.Data.BQL.BqlInt.Field<usrTestEmployee> { }

Hope it helps!!!