BPM documentation for custom code?

Could someone point me to the documentation for BPM custom code?

Specifically I’m looking for information on:

  • what temporary tables are available, details on exactly how they work.
  • BO functions and parameters

Or perhaps there is a screen/dialog somewhere inside Epicor that shows details on this?

I’m not finding it in epicweb. There is an old ERP9 SDK PDF with old info that is slightly helpful. ERP10 info would probably be OK.

Thanks!

1 Like

You will need an account to get in to Epicweb:

https://epicweb.epicor.com/documentation/user-guides

From here, grab the ICE Tools User Guide, Customization Guide, and Application guides.

https://epicweb.epicor.com/documentation/technical-reference-guides

From here, grab the BPM Cookbook.

Good luck!

6 Likes

“BPM cookbook” thank you! But it doesn’t mention the temporary tables.
They are sporadically mentioned in the ICE Userguide. But I was hoping there was more info somewhere else?

I’ve been looking for references too. I heard that they don’t use temp tables in Kinetic versions 2021.x and up anymore too. So things will be interesting when we get around to upgrading next year.

Interesting. I have some legacy 10.x code referencing the tt tables that still works. But can’t see where to get info on what all tts etc are available.

There is almost no documentation, and what does exist is old and sometimes incorrect. In some code editors (but not all) you can use Ctrl-Space to get suggestions. Try it on this. to discover the members of the class your code gets inserted into. Use the trace log to discover what should be in the datasets that are accessible to method directives. If you’re on prem, you can view the source of your BPMs to see how widgets get translated into code, and then use those features in custom code. You can also use reflection to discover the properties of objects. And you can add a reference to Newtonsoft.Json and dump entire datasets into info messages or comment fields.

I recently discovered a method where the trace log is a complete lie compared to what is actually in the datasets. Now I’m scared that the trace log isn’t as reliable as it used to be, or I thought it was.

3 Likes

What is that method?

ConfigurationRuntime.ProcessDocumentRules post.

1 Like

Sheesh, bless your soul trying to delve into the configurator. Trying to use it with the GUI yields wild results and bugs depending on how custom you get.

THIS IS A VERY GENERAL STATEMENT- I am a huge fan of the configurator and it works just fine. But if you are trying to push it to the limit, sometimes it gets buggy.

ProcessDocumentRules is the last method a product configurator calls, and it seems to be called only once per session no matter how many configurable subs there are, so it’s a nice place to put BPMs that are supposed to do stuff after a configurator runs. But it seems that maybe the configurator isn’t actually completely finished doing its thing when post BPMs are called here. :face_with_diagonal_mouth:

1 Like

Interesting

Good to know, hopefully our legacy customizations will port over fine too.

Followup question - Is there an easy way to access the tables within custom code? The variables available in the Expression dialog are not available in the Custom Code area. Eg:
image
image

When you use the “Specify C# expression” widget in the BPM designer, the code in the background is actually doing this:

var dsQuoteHedRow = Epicor.Customization.Bpm.EnumerableExtensions.GetSingleRow(ds.QuoteHed, "ds.QuoteHed");
this.CustNum = dsQuoteHedRow.CustNum;

So in your custom code you would need to do something like that or this:

var dsQuoteHedRow = ds.QuoteHed.FirstOrDefault();
if (dsQuoteHedRow != null)
     this.CustNum = dsQuoteHedRow.CustNum;
1 Like

Perfect tysm!!