# Are Epicor Widgets Broken? 🤐

**URL:** <https://www.epiusers.help/t/are-epicor-widgets-broken/85785>\
**Category:** Kinetic ERP\
**Tags:** customization\
**Created:** [December 22, 2021, 2:23pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785 "2021-12-22T14:23:44Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:16pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/41 "2021-12-23T16:16:04Z")

</div>

> [@hkeric.wci](#):
>
> I was pointing out that when you use a Widget in a POST and you invoke the same **Update** method you get different outcomes which dont align with Epicor’s usual way, when the Facade is called, you get different behaviour than what Epicor usually would do from Smart client

BPM/EFx are server-side stuff. It behaves as other server-side stuff works. In general, it behaves as the code of services. So the _usual_ way here is different from the client-side way.

> [@hkeric.wci](#):
>
> That is what the Epicor trace showed them

Again, trace shows client-to-server behavior. BPM works inside server and behaves like other server-side stuff.

> [@hkeric.wci](#):
>
> In addition since it doesnt include a **BeforeImage** when your facade fires the following would for example not work:

What **BeforeImage** means? I do not know what it is ☹

> [@hkeric.wci](#):
>
> What other fields besides callContextBpmData can one use, they are as dangerous once you start using them they can be overwritten by other BPMs.

Some UD fields for example.

> [@hkeric.wci](#):
>
> instead of ignoring the facade.

Just in case… Most likely, the ability to bypass facades will be removed in the future.

> [@hkeric.wci](#):
>
> If I took a poll how many people have used a foreach loop in their BPMs im sure 90% would say they have.

I agree that BPM and EFx need for-each functionality.

> [@hkeric.wci](#):
>
> Since Changed is actually !Unchanged

You make two mistakes simultaneously 😉

1. The article is about extension method added to ICE by me ;). There are 4 method, Add(), Updated(), Deleted() and Unchanged(). So Unchanged() means !Added() && !Updated() && !Deleted(). And therefore !Unchanged() == Added() || Updated() || Deleted().

2. UI options are inherited from E9. And they have the original means. Actually, there is no relation between UI options and these extension methods.

> [@hkeric.wci](#):
>
> The fix is to have a condition before that to check for Added or Updated or maybe add an option so we can select Added || Updated in the dropdown

As for me, the actual fix would be to switch to checkboxes 😉  
But I think that such changes have no chance to be implemented in windows client ☹

> [@hkeric.wci](#):
>
> Maybe its time to support RowMod U so folks can use Business Logic and not always go to **UpdateExt**

1. Maybe, but without official requests, it is least likely possible.
2. Do you realize that Update methods do not support multiple modified rows in most cases? (in contrast with UpdateExt).

> [@hkeric.wci](#):
>
> Are there any plans to support some newer C#?

Only after moving the editing logic from client to server. This transition is very complex and expensive.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:19pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/42 "2021-12-23T16:19:43Z")

</div>

> [@hkeric.wci](#):
>
> Without even a stop-watch can we assume that this:

Improper comparison :). You create a complex query with multiple fields. It is not needed for updating a single field.

But, in general, I wanted to add Udpate Table widget similar to Update Table by Query, but without source query. But again, there were no feature requests for that.  
And now, most likely, no one approves such functionality for the existing UI.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:20pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/43 "2021-12-23T16:20:15Z")

</div>

> [@SAD](#):
>
> What **BeforeImage** means? I do not know what it is ☹

BeforeImage is when you are in a POST and you do **GetByID** and you make a change, before you call Update or UpdateMaster and sometimes other Methods… you need to create a copy of the row, basically your own RowMod “” blank and then you make changes to second copy of the row RowMod “U”.

![image](https://www.epiusers.help/uploads/default/original/3X/6/8/680a508f7e836c107857ea6c4c953090ab77805b.png)

If you don’t certain methods will fail, they kind of require both. Epicor uses this technique throughout all of their BPMs. _Example from SDK_

 ![image](https://www.epiusers.help/uploads/default/original/3X/d/9/d9d1bc69c2e9658525a3192d786b4dcf061699c8.png)

* * *

 ![image](https://www.epiusers.help/uploads/default/original/3X/6/c/6cc75c66f31b086b8a70c5791c143c0c51717011.png)

Its not always update that only requires it others too.

 ![image](https://www.epiusers.help/uploads/default/original/3X/3/8/38aae2ba511d3d15d37601ee840d0faf10f88d34.png)

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:21pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/44 "2021-12-23T16:21:18Z")

</div>

> [@SAD](#):
>
> Maybe, but without official requests, it is least likely possible.

Do you not get to think for the users anymore ☹ you know those “our Customers would benefit from x”. Is it required now that you always have a request first?

---

<div class="post-metadata">

**Author:** ![JasonMcD](https://www.epiusers.help/user_avatar/www.epiusers.help/jasonmcd/32/22326_2.png) [@JasonMcD](https://www.epiusers.help/u/JasonMcD)\
**Post date:** [December 23, 2021, 4:21pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/45 "2021-12-23T16:21:36Z")

</div>

> [@KevinK](#):
>
> But this is an Epicor thing, not a coding thing.

Right, and that’s not a trivial distinction. I mean, a tech ref guide to BPM custom coding would be great, but I don’t see it ever happening, so it’s widgets, baby!

> [@KevinK](#):
>
> if you already live and breathe C#

Exactly.

If.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:22pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/46 "2021-12-23T16:22:25Z")

</div>

> [@hkeric.wci](#):
>
> **You are correct.** I was wrong. Not sure if I recalled this from the past using Custom Code after a Condition.

Definitely, I’m correct 🙂 I had to add this bloody stuff to the BPM on the late E10.0 development stage just because it works this way in E9 and this requirement was missed.  
Actually, you need to remember that filtering is not applied to the directive variables. And completely disabled in EFx.

> [@hkeric.wci](#):
>
> For sure trying to access Unchanged row in Custom Code after a condition won’t work

It is by design. By E9 design. Actually for directives where “with rule” setting is available (Standard DD and MD on services with multiple dirty row support) you can change rule from “matching” to “existing” (sorry, don’t remember the exact name).

---

<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:** [December 23, 2021, 4:27pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/47 "2021-12-23T16:27:32Z")

</div>

The thing is, there are like 50 people in the world who are wizards with Epicor widgets, and 50 million C# developers. For the company looking to hire someone to set up Epicor, the choice is clear… if they have a choice at all.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:28pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/48 "2021-12-23T16:28:20Z")

</div>

> [@KevinK](#):
>
> But despite this, if you already live and breathe C#, widgets feel even more restrictive than coding blind

I’m a professional developer (solution designer, architect) more than 30 years already.  
And. definitely, code is a more native approach for me.  
But widgets have a great benefit over the custom code blocks. They are upgrade-friendly. And it is a great benefit for the product customizations. Custom code is either hard to or even impossible to upgrade.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:30pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/49 "2021-12-23T16:30:58Z")

</div>

Just do not forget, that code generated now can be completely different from the code that BPM/EFx will generate in the next release.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:33pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/50 "2021-12-23T16:33:27Z")

</div>

I do like widgets or coding in blocks, it also lets me visualize the BPM Flow better. I do appreciate your time SAD. I am not bashing widgets; actually I want to use them. But I feel like I can’t without cluttering my flow with “hacks”. 🙂

**I’ve done plenty of:**  
 ![image](https://www.epiusers.help/uploads/default/original/3X/c/2/c27908d43fec1f382af4de9616b7fce1dfc4cf41.png)

**I do prefer this more:**  
 ![image](https://www.epiusers.help/uploads/default/original/3X/1/6/163fecefee17bda5fc7f2205a393bd5bcef42689.png)

**I want to get to this:**

 ![image](https://www.epiusers.help/uploads/default/original/3X/1/3/139a5a6c892e7d2686097d49a4bd3930056bda3a.png)

But I always end up with pockets of Custom Code 😛

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:36pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/51 "2021-12-23T16:36:26Z")

</div>

> [@hkeric.wci](#):
>
> BeforeImage is when you are in a POST and you do **GetByID** and you make a change, before you call Update or UpdateMaster and sometimes other Methods…

Thank you! Never heard about this recommendation. I never saw directives with such code. More precisely, no one sent such directives to me for review.

Just in case, modern versions (probably starting 10.2.700 or 2021.1) support BufferCopy-like stuff to clone the whole tableset.

Also, one of the things that I would like to see in BPM/EFx is clone widgets. But again - no requests mean no features :(.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:38pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/52 "2021-12-23T16:38:55Z")

</div>

> [@hkeric.wci](#):
>
> Do you not get to think for the users anymore

Do you work with management on your features? I guess it should be clear that management doesn’t want to invest in development if no requests come.

---

<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:** [December 23, 2021, 4:41pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/53 "2021-12-23T16:41:42Z")

</div>

> [@SAD](#):
>
> Custom code is either hard to or even impossible to upgrade.

Because the APIs the code is using are mostly undocumented in the sense of not being published and supported. When they change, no thought is given to backward compatibility. Evolving an API in a backward compatible way is a burden, but a much smaller burden than figuring out how to upgrade code after a breaking change. The problem from Epicor’s perspective is that they didn’t design these APIs to ever be supported. Supporting them would lock them in to their current design. And supporting them doesn’t align with their marketing.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:41pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/54 "2021-12-23T16:41:44Z")

</div>

> [@SAD](#):
>
> Thank you! Never heard about this recommendation.

I think between some of us we can send you some examples on email. Happens here and there 🙂

> [@Update BO Deleting PackSlip](https://www.epiusers.help/t/update-bo-deleting-packslip/50541/2):
>
> I’m sorry did you say it Deleted a pack??? open_mouth Do me a favor and pass in the BeforeImage let’s see if that helps using(var shipBO = Ice.Assemblies.ServiceRenderer.GetService\<Erp.Contracts.CustShipSvcContract\>(Db)) { CustShipTableset cTS = new CustShipTableset(); cTS = shipBO.GetByID(packNum); //Create Before Image var origRow = cTS.ShipHead.NewRow(); BufferCopy.Copy(cTS.ShipHead[0], origRow); cTS.ShipHead.Add(origRow); …

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:44pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/55 "2021-12-23T16:44:29Z")

</div>

> [@KevinK](#):
>
> Because the APIs the code is using are mostly undocumented in the sense of not being published and supported.

Not only. For example BPM and EFx can be moved out of proc and start working with Epicor API via REST/gRPC/etc. In such a case, widgets will work after the upgrade. Custom code… Most likely does not.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:45pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/56 "2021-12-23T16:45:30Z")

</div>

> [@hkeric.wci](#):
>
> I think between some of us we can send you some examples on email. Happens here and there 🙂

You are welcome. It can be a good input for the analysis.

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [December 23, 2021, 4:50pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/57 "2021-12-23T16:50:28Z")

</div>

> [@KevinK](#):
>
> Evolving an API in a backward compatible way is a burden, but a much smaller burden than figuring out how to upgrade code after a breaking change.

BPM is not about the full-fledged coding approach. It is about low-code customization. And we tries (mostly successfully) to support backward compatibility for them.  
Custom code is a kind of last resort. And upgradability of them is not guarantied.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:51pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/58 "2021-12-23T16:51:30Z")

</div>

One last note on UpdateExt. I do know it does Multiple. But we have stumbled plenty of time with it causing a Row has been modified by another user… especially when we did alot of Service Connect. So switching to a loop and individually calling Update resolved many of those headaches.

 ![image](https://www.epiusers.help/uploads/default/original/3X/f/0/f0af7df3c2fb4f7d4927c9c453fbd9db015e9b22.png)

**I dont f with UpdateExt anymore** I am all the way Update; lol

I do agree with you on so many things @SAD I hope that my bitching doesnt convey a negative image. I will try to make some Idea submissions and let them get evaluated.

As a full time Epicor developer; sometimes I feel like only Kinetic gets loved and everything else became second class citizen 🙂

I will for sure put the Set Field RowMod idea in 😛

Also is there any plans to stop people from joining ttTable to DbTable.

Off to day job.

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [December 23, 2021, 4:52pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/59 "2021-12-23T16:52:36Z")

</div>

> [@SAD](#):
>
> Custom code is a kind of last resort. And upgradability of them is not guarantied.

I saw that when we switched from 10.1 to 10.2 EF4 to EF6… had to rework a bunch of queries especially ones that used conversion helpers.

---

<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:** [December 23, 2021, 4:52pm UTC](https://www.epiusers.help/t/are-epicor-widgets-broken/85785/60 "2021-12-23T16:52:58Z")

</div>

I’ve actually never had custom code break after an upgrade. It would probably break if Epicor ever cleaned up their BO APIs in preparation for documenting and supporting them. I still wish they would…

[Previous page](https://www.epiusers.help/t/are-epicor-widgets-broken/85785.md?page=2)

[Next page](https://www.epiusers.help/t/are-epicor-widgets-broken/85785.md?page=4)
