Symptom
- Able to save a record for custom MDF object in profile even when the required attachment is not uploaded (added then deleted)
- OnChange rule on attachment field in custom MDF object is conflicting with delete action of the attachment
Environment
SAP SuccessFactors HCM Suite
Reproducing the Issue
- You have an OnChange rule on the custom attachment field to send an error message if there is no attachment uploaded
- Navigate to custom MDF portlet with attachment field in people profile
- Click edit to create a record, pop up window opens
- upload attachment to the portlet
- Then delete attachment -> you get the error message as per step 1
- Save
- Observe that the record is saved without the attachment even though the attachment field is set as required
Cause
- An onChange rule and deletion of attachment are parallel processes that run on a single field (the attachment field)
- It is technically not possible to have both onChange and deleteAttachment processes on same field.
Resolution
- One possibility is to have the same onChange rule move to a save rule on the object definition and also mark the attachment field as Required field.
- This ensures that user cannot save the record when attachment is updated or deleted.
Keywords
KBA , LOD-SF-MDF-RUL , Custom Oject based Business Rules , Problem
Product
SAP SuccessFactors HCM Suite all versions