I got a request to hide all inactive employees from the employee lists within the Material Request Queue and Material Queue Manager, by default. Epicor is thwarting all of my attempts!
TL;DR - Named Search, Quick Search, then BPM on GetList whereClause…
Attempt 1: Named Search
I created a BAQ to filter the list, created the Named Search, and set the options to Default, Auto Execute, and Return All Rows. This works great for me, but named searches seem to be user-specific, so every employee would need to create their own. I can’t seem to deploy it across the system.
Attempt 2: Quick Search
I created a QuickSearch based off the BAQ, but it needs extra clicks to run when I search, but it does run in testing the quicksearc. I wasn’t able to get the QuickSearch to show on the list either in Employee Maintenance, let alone MRQ.
Attempt 3: BPM to filter GetList
This time I figured I could prevent GetList from returning the inactive employees in the search window, similar to how we hide inactive shipvia’s and sales reps using @timshuwy’s How to Inactivate tips.
I made the BPM. It took a few tries to get the nomenclature correct (use “EmpStatus like ‘A’” in the whereClause). This also works to limit the list in the search box, but now it breaks the employee selection in MRQ!
When I select a material row, then Actions>Assign, and double click an employee name from the list, it defaults to a different person (always the same one)! If I disable the BPM, double-clicking the employee name properly assigns it to the employee I selected.
Comparing a trace with the BPM disabled and enabled, I see it’s calling the EmpBasicImpl BO, running the GetList, putting the employee I selected in the parameter whereClause (EmpID 783), but then returning a EmpID (0080)! EmpID 0080 is the first record in the dataset, for what it’s worth.
<tracePacket>
<businessObject>Erp.Proxy.BO.EmpBasicImpl</businessObject>
<methodName>GetList</methodName>
<appServerUri>https://masked</appServerUri>
<returnType>Erp.BO.EmpBasicListDataSet</returnType>
<localTime>1/13/2023 17:26:19:3577465 PM</localTime>
<threadID>1</threadID>
<correlationId>9232b9cf-d26e-4f8c-aa91-390ca346b79b</correlationId>
<executionTime total="110" roundTrip="101" channel="0" bpm="0" bpmDataForm="0" other="9" />
<retries>0</retries>
<parameters>
<parameter name="whereClause" type="System.String"><![CDATA[(EmpID = '783') BY Name]]></parameter>
Why is it returning a different employee? There’s nothing else in the trace after that. Maybe it’s actually returning the right employee, but displaying the wrong one? More to test Monday…
***Is there a better way to accomplish hiding the inactive employees without breaking Epicor? ***