I appreciate the conversation!
- It occurs only when a smart client proxy is used (probably web-ui was updated to support this mode too). Calls via REST, Service Renderer, naked service-methods do not have such āmagicā
- This behavior has no relation to PRE (or any other BPM-specific things). It is just about client-to-server call convention.
- Also, āEpicorā sends not only the updated tables but all parent rows for modified rows.
- All above is true only for tableset parameters with ref modifier. In the case of ānormalā parameters, even client proxies send whole tablesets.
I understand that, I am not complaining that Epicor does it that way. I love it that way. 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; not to rely on that.
For example Iāve seen folks do if (ttOrderDtl.Any()) { ... }
when a ipTableName isnāt present they check if the ds has that table to indicate its probably a OrderDtl update. That is what the Epicor trace showed them. But little did they know is that calling Update from a POST or Service Connect would mess up their PRE since it would send ttOrderDtl, ttOrderRel, ttOrderWhatever
- just be cautious id say.
In addition since it doesnt include a BeforeImage when your facade fires the following would for example not work:
The saying Just do a trace and you will know what Epicor does and repeat it isnāt necessarily accurate if one thinks the behavior will be the exact same, atleast when using built-in widgets vs Custom Code.
It is a bad idea to bypass facades. In general, this parameter is for infrastructure only. If you call Updated from Update, you just need to make your code self-protected.
What other fields besides callContextBpmData can one use, they are as dangerous once you start using them they can be overwritten by other BPMs.
Also if you have 10 PRE BPMs you would need to add a gatekeeper to all of them, instead of ignoring the facade.
- Just in case, loops are not supported officially. And validation explicitly says about that.
- They are not blocked, since they work in general. But you have to clearly understand how Epicor logic works to implement complex cases.
Something as simple as Loop through all OrderDtl and Update a OrderRel column with a datestamp isnāt a complex case.
I know they are not supported officially; is there a reason the BPM Customization tools have been stale for a while now. If I took a poll how many people have used a foreach loop in their BPMs im sure 90% would say they have.
Could you please point me to the exact place in the guide? Changed == Add|Updated|Deleted since E9 (AFAIR).
Since Changed is actually !Unchanged when the code is generated, based on that Guide we all started off with when coming off E9 to E10 - it was taken was !Unchanged() is Added or Updated.
Here is an actual BPM that I have currently have in Production that would exception on Delete:
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
Direct modification of RowMod column is dangerous. The whole Epicor business logic relies on it.
Most likely, Set Field widget restricts access to it, since the widget came from the time when only parameter ātablesā were supported. And RowMod in such tables should not be changed ever.Also, if you need this functionality in Set Field, did you create a feature request?
An example where you always have to set RowMod to U is pretty much on many OnChangeSomething methods. Maybe its time to support RowMod U so folks can use Business Logic and not always go to UpdateExt
Many of the OnChangeSomething check for !string.IsNullOrEmpty(Row.RowMod) you must be able to set it, dangerous or not.
- we never promised that we will support never version of C# in BPM/EFx.
- you can treat it as Epicor dialect of C#.
Are there any plans to support some newer C#? Yeah you never promised it I am not saying you did; but why do we have to be so far behind. Maybe something like a FeatureFlag to set CompilerServices language version, wouldnāt be bad.