SAP Knowledge Base Article - Public

3623586 - Required field validation is not working for child MDF object record if no data was filled in child record

Symptom

  • The "Required" field validation is not working for child object record if there is no data filled for any other child field.
  • End user could save the MDF record without filling any field in child MDF record even if some fields in child MDF are set to Required.

Environment

SAP SuccessFactors HCM Suite

Reproducing the Issue

  1. Create a Parent-Child MDF object and set some fields to be required in Child object either in UI level or object level.
  2. Navigate to Employee Profile portlet or Manage Data page.
  3. Create a new record without filling any data in child object.
  4. Save the record.
  5. Observe that the required field validation does not work.
  6. Open the saved record and save it again without making any changes.
  7. Observe that the required field control works again.

Cause

The system does not validate the required field if no data is entered in any other child fields when saving the initial record.

Resolution

This behavior is expected and by design. When no data is entered in any child fields, the system considers it as an empty row and required fields will not be validated.

If you would like to make it possible to validate the required field even if there is no data filled in the Child object record, please follow the below workaround.

Workaround:

  1. Go to Configure Object Definition and navigate to the child object.
  2. Create an Initialize Rules with details (If always true, then set any field in child object to be any value) .
  3. Then go back to Employee Profile and insert a new record without filling any data, you will observe that the validation of required field is working again
  4. If you do not want that field to be visible to users, configure the UI settings to hide the field in Manage Configuration UI
  5. Go back to Employee Profile and you will find that the validation of required field is still working even if the field written by Initialize Rule is hidden.

Keywords

Required field, Required validation, Child object record, SAP SuccessFactors, MDF UI screen, PP3 portlet, Employee Profile,UI rules, Initialize rules, Validation, Empty row, expected behavior , KBA , LOD-SF-MDF-OBJ , Object Definition & Field Related Issues , Problem

Product

SAP SuccessFactors HCM Suite all versions