UI Modification: setRequired(true) Not Working in Edit/View Screen

Hello,

I’m encountering something strange regarding setting a field as required in ui modification.

In the create screen, I’ve added the following code during initialization:

field.setRequired(true);

This works as expected—the field is successfully marked as required.

However, in the edit/view screen, the same logic doesn’t seem to apply. The field is not marked as required.

Is this expected behavior, or am I missing something?

Thanks,
Ibrahim

Hi @IbrahimItani

field.setRequired(true) works only for create context.

You can make this field required in your field configuration scheme.

1 Like