BPM code changes from 10.x to 11

Hey all, I’m pretty new to BPMs in general, and I’m working with some old code that needs to be acclimated to the new Kinetic version.

In our current implementation the code, we create what seems to be a table-type class, define some parameters for it, and add it to the database:

OrderHedUPS oU = new OrderHedUPS();

//Do stuff
...

Db.AddToOrderHedUPS(oU); //<--- Syntax Error
Db.Validate();

However in the new version the method Db.AddToOrderHedUPS() does not exist.
I looked for it with the CTRL+SPACE shortcut but can’t find it. The only relevant options I see are:

Db.Add() or Db.AddObject ()

I tried finding more information about these methods but there doesn’t seem to be documentation like you’d find for most programming libraries, so I’m not sure how these would work in practice.

From other code examples here, some people seem to use Db.SaveChanges(); as well instead of Db.Validate()

I guess my question is, where can I find more info on these methods, or does anyone know exactly how this code could be translated to a new implementation in version 11?

@juandnavia Welcome. This all needs to move to using business objects and not Db.

Here is a thread on resources. I would do a trace on the thing you want to automate in Epicor and then use the BLTester to get the parameters down.

1 Like

Thanks for the quick reply @gpayne

What a fantastic rabbit-hole of information! Right off the bat, the .CHM schema for Kinetic and the Visual Studio Extension seem like wonderful tools.

Not entirely sure what business objects are exactly and how I would transform the current BPM code to use it, but I’ll keep digging.

Another link to EpicWeb Documentation. The add a misc charge to a sales order is similar to what you are doing. I would also search for erp bo ref on EpicWeb and find the latest 10.2.700 bo reference.

https://epicweb.epicor.com/doc/Docs/Kinetic_bpmcookbook_2021.1.pdf

Alternatively, the REST swagger page.

1 Like