Making A UDF Required

Hello Everyone,

I just created a new field on the customer screen. I need assistance in making the field required.
So if anyone can explain how to accomplish this, I would appreciate it.

Thanks in advance.

Miguel

The most basic way is to make a BPM on the Update method, that raises an exception when that field is blank.

Hello Calvan,

Doesn’t that just put a pop up box on the screen, but the user can still ignore it and leave it blank?
Or will keep the user from leaving the field blank?

Please send me an example as I am new to this.

Thank you.

Miguel

An Exception will keep the BPM from completing. So have the pop-up tell them why the record could not be saved.

Does E9 have the graphical BPM designer, or the old one where you have to choose each condition and action as a row?

Here’s how I check for blank ProductGroup on a Sales Order (works the same for a UD field)

Make a BPM on SalesOrder.Update, of type Pre-Processing
Add a condition to check the field I want to validate. My example is
The ttOrderDtl.ProdCode field of the updated row is equal to '' (that’s two single quotes)
Use a Raise an Exception action when the condition is true.

The even easier way is to mark the UD field as required, in UD field maintenance

image

(sorry if this doesn’t apply to E9)

Does E9 have Extended Properties like e10 has?

Checkbox for required is the simplest way these days.

@bderuvo
Yes E9 has extended properties.

FWIW - I believe that making a UD field mandatory only affects new record creation. If records existed before the UD field was added as or changed to mandatory, those records can be updated with that field being blank.

I using a BPM instead, you’d want the condition to also check for something that would indicate that it’s a record from prior to this field being required (like OrderNum > the last order number prior to implementing it, or record date, etc …)

I prefer BPMs as well… Method Directives preferred, Data Directives second.