SAP Knowledge Base Article - Public

2633538 - How to set a Custom Field on a Custom UI View as Mandatory

Symptom

You have a Custom Field in a Custom UI View and you would like to set this field as mandatory directly on UI Designer, but you don't know how

Environment

All Version of SAP Hybris Cloud For Customer

All Versions of SAP Business ByDesign

Resolution

There is a Field setting on UI Designer where we can set the property "Mandatory" of the field as "True", but this setting is only used for aesthetic purpose. It will only add the read '*' on top of the field label, but no Runtime validation on client will be added.

mandatory.png

To set a Custom Field of a Custom UI View as mandatory you can use one of the following ways:

1. Use a ABSL Script Event (Event-BeforeSave and Validation-OnSave) to check if any valid value was maintained on the field, raise error message and prevent save in case the value is empty or not valid.

OR

2. Use the Key User Tools (KUT) to change the properties of this field and set it as mandatory.

Keywords

Custom View; Custom Field; Field; Mandatory; KUT; Key User Tool; UI Designer; , KBA , AP-RC-UIF-UX , UI Framework User Interface Design , How To

Product

SAP Business ByDesign all versions ; SAP Cloud for Customer add-ins all versions