ok, so just working on wrapping my head around what’s happening, so tell me if this is correct.
The labor head sequence is created when the employee clocks in right? So they should have a current one that I can pull into the BAQ using calculated fields using context data correct? So I don’t have to create a labor head record, since they are already there. So the get by ID “la.GetByID(123456);” is simply pulling in the data set from the current labor head sequence for use later. So your code is creating a data set called la, which we can use later in the code. Is that a correct explanation?
For the second chunk of code, If I was doing this in MES, I wouldn’t call the GetNewLaborHed1 right? Since there will already be one for a clocked in employee? I would start with the get by ID for the labor head sequence. Then I would do a new labor detail to create a data set (same as the “ds” set in the trace right?) Could I then adjust that data set with all of the information needed? Gathering if from the header dataset we pulled in, and data from the grid? Then I would run that dataset through each of the BO’s in the trace to check for errors, and finally run last one, Update. Is that generally what’s happening?
On a details level, I’m missing the connection of what I see in the trace, to what I do in the code.
If I see this in the trace
To call that in the code, does that go like this (we’ll assume la is my dataset)
la.DefaultJobNum(expression); (I will need to learn what I need to put in the expression…)
How does it know that Erp.Proxy.BO.LaborImpl is the BO being used? Is that assumed because of the LaborAdapter? Or am I supposed to call la.BOLaborImpl(); where you have La.BoConnect();
Sorry for my ignorance on this. The two different contexts are making it harder for me to see the patterns when I’m trying to see what is related to what.