Creating a LaborDtl from uBAQ


Is it possible to create a LaborDtl from a dataset on a uBAQ?

Once a tick box has been checked create a labordtl record with the data of the ticked row. Is it possible? I was told to use methods but I’m not sure where to start.

Any able to point me in the right direction?

First you want to learn how to run a trace. Check out this thread: How do you read/analyze a trace log?

Once you get a handle on running the trace, you want an easy way to parse through the data. Check out Jose’s Trace Helper Utility. Trace Helper Utility for Epicor ERP 10

Once you have those in place, run a trace while creating the labor detail the normal way (through time and expense entry, I think). The trace will log all the methods that epicor uses to create the records. Often it logs waaaaaaay more than you need. So you will have to step through the trace with that utility and look for the places where labordtl records are created. This take a little bit of deciphering, but its not too difficult. I imagine that your method will look something like this: Erp.Proxy.BO.LaborImpl.GetNewLaborDtlWithHdr()

Good luck!


Hi Nate,

I have given it ago with BPMs on my BAQ.

I can’t seem to get it working.

Any ideas? BPMs are still very rough ground with me.

Kind regards,

Generally speaking you want an Update method from the same business object at the end of a BPM. This is not always true, some methods include an update method within them (or something similar). Whenever I have created new records from a BPM, I have needed to use the Update method to actually commit the changes to the database.

You also may want to add another field to your Setup Table Mapping. Go down the list to find RowMod, and set it = “A” for adding a record.

I wish I could be more specific about when to use all these things, but they are just things that have worked for me in the past.

Good Luck!

There are likely a few other issues, but your setup looks like a good start.

1 Like

Thanks Nate

Do you mean like this?

It’s fairly involved; I did this with a function, but I see you’re on 10.2.400, so that’s unavailable.

But the process is the same for a BPM, as @NateS outlined.

As others have said in the past, perhaps you don’t need all the methods of the trace, but it is recommended to replicate what the trace does very closely.

1 Like

I think you want the order to be Condition 0 > Invoke BO (Get New) > Update Table by Query > Invoke BO (Update). I don’t think you need the fill table by query.

1 Like

Hi Jason

This is a powerful function you’ve got!

I’m looking to create a LaborDtl record with a qty and labor note. The information is from a baq ds.

Do you have a BPM with the same concept you wouldn’t mind sharing?

Kind regards

1 Like

Unfortunately for you, no, once Functions came along, I abandoned BPMs from that day forward - except for the BPM to trigger a function lol.

But again, it’s the exact same stuff.

1 Like

No worries.

What are you doing in your bindings for "Default JobNum 1"

Anyone know what these means?



This is the BPM so far

1 Like

It looks like you are close!

I don’t understand why I won’t create a record though. I must have something wrong!

When your BPMs start to get large, debugging can be a pain. Insert a message box with a few helpful fields. First put the message box after your condition. Don’t connect anything to the output of the message box. This should allow your BPM to run up to the point of the message box. This can help you figure out which widget is the culprit. Once you run it and get the message box, close it and move the message box to the next widget. Keep stepping through, running the BPM after moving it between each widget. Once you find the bad one, lets try to figure out what to do with it.

When you are done tithe the debugging message box, you can just leave it in the BPM unconnected to the side for future debugging.


Roger that, I will give it a try!

Nate helped me with this a long time ago and his method of debugging is great… The only thing though nate!!! we need to write some code to format the data into xml or a json object so we can query it in excel or whatever.

My errors are coming from my invokes!

I am setting the jobNum from variable above!

Any ideas?

what is the value of the variable before this method call?