GET NEW via a UBAQ and REST

Hi Help

Can you use an updateable BAQ via REST. We have added a UBAQ to add a order and order line and it works via the screen, now we need to access this via REST passing the order / partnum etc parameters.

Is this possible?

Thanks

Steve

Yea just go to the swagger help screen for that BAQ and you’ll see what the requirements are

1 Like

@josecgomez,

What would be the benefit of using a UBAQ via REST vs an Epicor Function? :thinking:

1 Like

One benefit as it stands right now is that @SKB843 already has the UBAQ working and it would be easier to run it as is rather than build a function.

@SKB843 I would try creating a function as @Mark_Wonsil is suggesting- just to get the hang of it and add another tool to your toolbox. I think you could even build a function to run your updatable BAQ if you really wanted to.

Not much other than he already has a query done.

Also ubaq are very point and click out of the box functions can require some TLC if you aren’t familiar with them

2 Likes

Ah, gotcha. Yeah, if you’re upgrading then that makes sense. But for a greenfield solution, maybe a function gives you more options for the future.

2 Likes

Hi Everyone,

Thanks for your help.

I got it working using the Patch method in the UBAQ using ‘Swagger’ included in the REST API with Epicor . To load the the order and the line required two UBAQ’s. One for the header creation and one for the line. The Rest response for the header included the SO# number and this is then used in the UBAQ to add the lines. You need the SO# to add line as this is the KEY in the Header and Detail tables.

The header creation was achieved with a very small amount of fields as below, and can be even fewer than this.

{
“OrderHed_Company”: my company
“OrderHed_CustNum”: 0,
“OrderHed_FOB”: FREI",
“OrderHed_NeedByDate”: “2021-12-13”,
“OrderHed_OrderDate”: “2021-12-13”,
“OrderHed_OrderNum”: 0,
"OrderHed_OTSName “: TEST,”
“OrderHed_PONum”: “WOO”,
“OrderHed_RequestDate”: “2021-12-13”,
“OrderHed_ShipViaCode”: “FIS1”,
“OrderHed_UseOTS”: true
}

Thanks again

Steve

1 Like

Totally agree!

Nice Steve!