UI Customization, DD or BPM

I’ve added three UD fields to the OrderHed table. Two of them get user entered values, the third is calculated form the other two.

Best to do this as customized Order Entry form, as a In-Tran DD, or a BPM?

(and by “best” I mean “easiest to implement and maintain, and least likely to cause issues elsewhere”)

easiest way is either a method or data directive BPM. Why? Because BPMs can be turned on/off for everyone, deployed everywhere (server side vs. client), and they are portable. Secondly, if you ever input data other than through the UI, youll get the same behavior.
BPM all the way from me.

1 Like

I started down the path of the DD. I figured it should be an In-Tran so it updates the third field on the UI.

But I can’t seem to do a simple Set Filed widget. I’m trying to set the field BidMarginPct. But the expression gives me the following error:

I’ve regen’d the data model and cycled the App Pool IIS. The thre fields on the UI show up, values can be entered and does save.

Did you try the ttOrderHed[“BidMargin_c”] syntax? I’ve never worked out why that’s sometimes needed, but it does seem to be.

Yes. But it complained about converting a ‘string’ to an ‘int’. Which I assumed the array reference needs to be an integer, and not a string indicating which element.

I’m usually not a fan of direct field math. I like to build in some conversions and checks before trying to do math.

1 Like

In those cases, (int)ttOrderHed[“BidMargin_c”] usually works, or at a pinch (int?)ttOrderHed[“BidMargin_c”] ?? 0.

I couldn’t even assign a variable the value of ttOrderHed.BidMargin_c

Same “OrderHed TempRow does not conatins …” error

Did you try what @dhewi suggested?

I don’t think it’s amismatch of types between the ttOrderHed field and the target field, but rather it doesn’t like a string being between the […]

Oh I see. It’s ttOrderHedRow.YourField_c, not ttOrderHed.YourField_c

I think I may be a victim of only cycling the ISS for the specific App (my test environment), instead of the IISRESET

No…just type the field correctly

Just setting the expression to:
ttOrderHedRow.BidMargin_c

yields

image

EDIT: that expression is what I get by double clicking the field in the Available Variables pane.

Hmm, so you added the field in Extended UD Table Maintenance, regenerated the data model, and then recycled IIS correct?

Yes. but by “Recycled” I did it in the EAC. Not via ISSRESET on a command line.

From the help:
image

Emphasis on “May be able to” …

I would have interpreted that as the compiler not knowing the type of the field, but you probably know better than I do. In which case I’m out of ideas, sorry! I’ve yet to have all three versions fail.

It is certainly very odd that the editor allows you to select those fields and then still complains. The fact that they’re showing up surely means that the data model regeneration has done its job? We’ve never had to do an IISRESET for that, though now we have more than one app server we do have to do it in both.

In extended table maintenance, does it show that the OrderHed table is in sync?

Yup

image

Hmm, this is weird. Can you try regenerating the data model again and do the IIS recycle? I’ve seen weird things before with the data model regen…