UD Customization - General Enhancements & Auto-Populate data

Good afternoon,

Version: 10.2.300.9

(Disclaimer: I have been using Epicor for less than 6 months, and have never really spent any time coding prior to this role i’m in. Through the hundreds of BAQ’s i’ve created, I’ve become somewhat proficient with SQL, but other aspects of programming are still somewhat new. With that being said, I appreciate your understanding and for simplifying any difficult concepts.)

I have utilized one of the UD tables to create a place where supervisors go to enter in overtime (OT) for their employees. This was my first time ever using one of these, and my methods used to achieve this were pragmatic to say the least. I want to make some enhancements to the functionality for many reasons, but am not exactly sure how to obtain the results I desire.

I am using the following fields: (please feel free to make any suggestions if you see a better way)

Key1 = Supervisor ID (BAQ zone linked to BAQ with supID & calc. field for Supervisor name)
(Like: EmpBasic.SupervisorID - Format: x(4))

Key2 = Employee (BAQ zone linked to BAQ with Emp Name, ID, & calc field for Supervisor name) (Like: EmpBasic.Name - Format x(25))

Key3 = OT Reason (Figured i’d make the OT reason a key field, anticipating a unique explanation for each OT record)

Date01 = OT Date (Date OT was entered)

Number01 = OT Amount (Amount of OT in decimal hours (0.00))

Here’s what it looks like -

Desired Results:

  1. Whenever a new record is created, and the supervisor fills in the Employee (BAQ zone) with the Employee Name, I wanted to collect the associated EmpID in another field that is not visible to the user for every new record. So the Supervisor see’s the employee’s name, but has no idea that I am also capturing that employee’s ID (Having the EmpID would strengthen the integrity of my OT BAQ & Dashboard)

  2. Whenever a new record is created, and the supervisor fills in the Employee (BAQ zone) with the Employee Name, I also wanted to display/fill the epiPictureBox with the corresponding Employee Photo (I believe it’s stored in the EmpBasic table under ImageID)

I made this about 2 months ago, and it’s functional and does what it’s supposed to for the most part, but my overall development was contingent on what I knew at the time I created it. Looking at it now, I know that it can be improved.

This online community has always been very supportive, and I really appreciate any suggestions or help that anyone is able to provide here.

On item #1 you could store the EmployeeNum instead and present the Employee Name in a drop down box rather than storing the Employee Name as text. This way, the supervisor can select the employee from a list rather than returning it via BAQ Zones. You can use a Retriever/BAQ/Basic combo box for that…whatever suits your needs. If you need to do it as text, you can create an AfterFieldChange method and a simple search wizard to go get the employeenum from the employee name but that is inverse when the employeenum is the unique ID. Better to just get the ID the first time.

On item #2, I don’t know if a control is available in the Epicor toolset to display the image data. I couldn’t find one but SSRS has one. The link is in Part.ImageID, as you say, but the data is stored as binary data in a separate table. If it were a file on the network, the picture box can work.