uBAQ - Add records to POHeader, PODetail & PORel

I am trying to add records to PO using uBAQ; I receive an error “valid Qty is required,” though I have included qty field from PORel table, not sure what is missing.
I am attaching the BAQ for your reference. I appreciate your help.AddPOUsingUbaq.baq (46.3 KB)

Have you traced the methods yet? First you want to turn on tracing, then perform the actions in Epicor to add new PO records. The trace will record which methods fire. Turn off tracing once you are done adding the records. Then you should use Jose’s Trace Differ Tool (Trace Helper Utility for Epicor ERP 10) to more easily see the methods you need to include in your action.

Reproduce those methods in a custom action in your UBAQ. Do not use the base events, make a new custom action. You also have to define the action in the BAQ menu Actions > Define Custom Action.

Also check out this older post with tons of helpful code blocks and notes from people smarter than me! Create new line and release from UBAQ custom code

Good Luck!
Nate

Thanks, Nate. I will give it a try.

Hi Nate,
Using what you recommended, I successfully created a PO and the first line using the BO Method calls. Thank you.
The current issue is that I am struggling to get multiple lines added to the PO. When I run the trace as you recommended, the trace file keeps calling GetNewPODetail for each line. In my BPM, I am NOT using custom code and I am not sure how to filter the information so that I would not get the duplicate rows error.
I am attaching documentation for the whole BPM. I would appreciate any help.Create PO Using BPM - Invoke BO Method.pdf (1004.9 KB)