SAP Knowledge Base Article - Public

3235428 - Custom MDF Portlet - able to save without attachment even if it is set as required

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

  1. You have an OnChange rule on the custom attachment field to send an error message if there is no attachment uploaded
  2. Navigate to custom MDF portlet with attachment field in people profile
  3. Click edit to create a record, pop up window opens
  4. upload attachment to the portlet
  5. Then delete attachment -> you get the error message as per step 1
  6. Save
  7. 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