Laboring over Labor Adapter

Epicor version 10.1.400.18. I cannot get this adapter to behave. I am trying to update our 9.05 customization. The customization is called Holiday Entry and is built on top of the Time and Expense Entry form. It allows the user to select a date, input the number of holiday hours, select multiple employees, and press a button to apply these hours to each employee. I was wondering if anyone else is having trouble with this adapter. The easiest way to tell if the problem exists is to open the labor adapter with the BL Tester and simply select the GetNewLaborDtlWithHdr method. It immediately pops up an error stating ā€œUnhandled exception has occurred in a component in your application. Unknown parameter type: RuntimeParameterInfo for parameter ipClockInDate.ā€ When you are selecting the method in the BLTester, the Signature shows question marks in the parameters. Iā€™ve never seen this before. Iā€™m thinking they were working on this DLL and ā€œforgotā€ to update it?

Iā€™m waiting on a trace from our plant to look into this further but Iā€™ll bet Iā€™m going to see LaborImpl adapter methods and Iā€™m not sure what the Impl is supposed to mean to me.

Not sure if it this relates exactly, but it may prove useful

Thanks Jose! That is getting me somewhere. It led me to take a close look at the definition of the parameters for the GetNewDtlWithHdr method. Seems they are using a System.Nullableā€™1 parameter type for DateTime. I have not seen that before. Must be something new with writing straight to SQL instead of Progress writing to SQL.

Which led me to another post which showed the System.Nullable type.

Iā€™m thinking your issue may relate to a special variable type called
nullable. Thatā€™s what the ? usually represents

Yes. It was the System.Nullable data type. Problem is resolved.

dim PayRollDate as System.Nullable(Of Date)
dim ClockInDate as System.Nullable(Of Date)

Also, for anyone playing with the Labor adapter and looping through multiple records, dispose of the adapter after each record in Epicor 10.

That will cause performance issues you can run clearData() in the adapter to remove all the data from it and start fresh

I had the Adapter.ClearData() function in there and remarked it outā€¦.for some reason. Iā€™ll put it back in there and move the load and dispose outside the loop and see if it works.

JPS

LAdpt.ClearData()

Error: BC31429 - line 298 (1028) - ā€˜clearDataā€™ is ambiguous because multiple kinds of members with this name exist in class ā€˜Ice.Lib.Framework.EpiBaseAdapterā€™.

I guess this is why I removed it.

Thatā€™s because you are writing in VB. There is a ClearData() method and a clearData() method which works fine in C# but VB is not case sensitive. :confounded:

1 Like