# BPM documentation for custom code?

**URL:** <https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339>\
**Category:** Kinetic ERP\
**Tags:** bpm\
**Created:** [March 10, 2022, 4:28pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339 "2022-03-10T16:28:17Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![TerryR](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@TerryR](https://www.epiusers.help/u/TerryR)\
**Post date:** [March 10, 2022, 4:28pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/1 "2022-03-10T16:28:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![NateS](https://www.epiusers.help/user_avatar/www.epiusers.help/nates/32/18519_2.png) [@NateS](https://www.epiusers.help/u/NateS)\
**Post date:** [March 10, 2022, 4:37pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/2 "2022-03-10T16:37:27Z")

</div>

You will need an account to get in to Epicweb:

[https://epicweb.epicor.com/documentation/user-guides](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](https://epicweb.epicor.com/documentation/technical-reference-guides)

From here, grab the BPM Cookbook.

Good luck!

---

<div class="post-metadata">

**Author:** ![TerryR](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@TerryR](https://www.epiusers.help/u/TerryR)\
**Post date:** [March 10, 2022, 8:05pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/3 "2022-03-10T20:05:37Z")

</div>

“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?

---

<div class="post-metadata">

**Author:** ![Randy](https://www.epiusers.help/user_avatar/www.epiusers.help/randy/32/51539_2.png) [@Randy](https://www.epiusers.help/u/Randy)\
**Post date:** [March 10, 2022, 9:53pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/4 "2022-03-10T21:53:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TerryR](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@TerryR](https://www.epiusers.help/u/TerryR)\
**Post date:** [March 11, 2022, 2:58pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/5 "2022-03-11T14:58:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KevinK](https://www.epiusers.help/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@KevinK](https://www.epiusers.help/u/KevinK)\
**Post date:** [March 11, 2022, 3:19pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/6 "2022-03-11T15:19:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [March 11, 2022, 3:22pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/7 "2022-03-11T15:22:14Z")

</div>

What is that method?

---

<div class="post-metadata">

**Author:** ![KevinK](https://www.epiusers.help/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@KevinK](https://www.epiusers.help/u/KevinK)\
**Post date:** [March 11, 2022, 3:24pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/8 "2022-03-11T15:24:43Z")

</div>

ConfigurationRuntime.ProcessDocumentRules post.

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [March 11, 2022, 3:30pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/9 "2022-03-11T15:30:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KevinK](https://www.epiusers.help/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@KevinK](https://www.epiusers.help/u/KevinK)\
**Post date:** [March 11, 2022, 3:41pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/10 "2022-03-11T15:41:55Z")

</div>

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. 🫤

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [March 11, 2022, 3:46pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/11 "2022-03-11T15:46:46Z")

</div>

Interesting

---

<div class="post-metadata">

**Author:** ![Randy](https://www.epiusers.help/user_avatar/www.epiusers.help/randy/32/51539_2.png) [@Randy](https://www.epiusers.help/u/Randy)\
**Post date:** [March 11, 2022, 3:53pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/12 "2022-03-11T15:53:07Z")

</div>

> [@TerryR](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![TerryR](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@TerryR](https://www.epiusers.help/u/TerryR)\
**Post date:** [August 10, 2022, 3:43pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/13 "2022-08-10T15:43:08Z")

</div>

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](https://www.epiusers.help/uploads/default/original/3X/a/e/ae195ef531eb145c662bc98f9be4f2be0c325753.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/d/0/d0016f0b5d73aa8694f83f18f6834a1fca837edb.png)

---

<div class="post-metadata">

**Author:** ![Doug.C](https://www.epiusers.help/user_avatar/www.epiusers.help/doug.c/32/26714_2.png) [@Doug.C](https://www.epiusers.help/u/Doug.C)\
**Post date:** [August 10, 2022, 3:58pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/14 "2022-08-10T15:58:25Z")

</div>

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

```cs
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:

```cs
var dsQuoteHedRow = ds.QuoteHed.FirstOrDefault();
if (dsQuoteHedRow != null)
     this.CustNum = dsQuoteHedRow.CustNum;

```

---

<div class="post-metadata">

**Author:** ![TerryR](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/ed655f/32.png) [@TerryR](https://www.epiusers.help/u/TerryR)\
**Post date:** [August 10, 2022, 4:20pm UTC](https://www.epiusers.help/t/bpm-documentation-for-custom-code/88339/15 "2022-08-10T16:20:30Z")

</div>

Perfect tysm!!
