Custom on UD37

Hey everyone

Versión EPICOR 2023.1.25

UD37 Original


I have left the UD37 canvas blank so I can add the components seen in the image.


I have a question:
Can I make a custom this way?

My Code:

       try
       {
          using (var laborAdapter = new LaborAdapter(this.oTrans))
          {
             laborAdapter.BOConnect();

             string employeeNum = "12345";
             string jobNum = "307287-1-1";
             int assemblySeq = 0;
             int oprSeq = 10;
             MessageBox.Show("Actividad de produccion iniciada correctamente: " + jobNum + " / " + employeeNum);

             laborAdapter.GetNewLaborHed();

             var dsLabor = laborAdapter.LaborData;
             var laborHedRow = dsLabor.LaborHed[0];
             laborHedRow["EmployeeNum"] = employeeNum;
             laborHedRow["JobNum"] = jobNum;
             laborHedRow["AssemblySeq"] = assemblySeq;
             laborHedRow["OprSeq"] = oprSeq;
             laborAdapter.StartActivityByEmp(employeeNum, jobNum, assemblySeq, oprSeq);
          }
       }   
       catch (Exception ex)
       {
          MessageBox.Show("Error al iniciar la actividad: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
       }

In this line:
laborAdapter.StartActivityByEmp(employeeNum, jobNum, assemblySeq, oprSeq);
I get this message error:
No overload for method ‘StartActivityByEmp’ takes 4 arguments

Help me
How can I fix this error?

In simple terms, your method only takes 3 parameters, and one is an output dataset, so only 2 input parameters.

To learn how parameters are used I find it best to locate the method in a BPM widget so that I can see what is required. In this case, the method StartActivityByEmp takes 2 input parameters, and one output parameter. See the screenshot or navigate to the method in Labor.StartActivityByEmp.
StartType is either P for production or S for setup.

In order to add the other fields you need to record a labor entry (job, assembly, and operation), you have to see the other methods that epicor uses. Run a trace, then perform a manual start production activity.

Use Jose’s trace parser to find the methods used. Trace Helper Utility for Epicor ERP 10 - Epicor ERP 10 - Epicor User Help Forum. Or use the kinetic version if you want: Kinetic Trace Helper Utility 1.0 (Kinetic Web) Chrome Extension - Kinetic ERP - Epicor User Help Forum

The last time I checked, these are the methods that get triggered when an employee enters time on the MES.

Capture242f4dsdddsd
I think you need at least StartActivity, DefaultJobNum, and DefaultOprSeq. But in reality, you may need more of these methods to fully replicate a proper labor entry.

Good luck!
Nate

3 Likes