Symptom
- In Emergency Contact Information, when one record is updated there are two warning messages displayed, The warning message is displayed for the OLD value and NEW value.
- This is happening if either/ both Name and Relationship is updated.
- In the rule trace, the validation business rule is getting executed twice.
Environment
- SAP Successfactors Employee Central
Reproducing the Issue
- Create a validation business rule for Emergency Contact Information shown as below
- For a sample user's Emergency contact information> Update either Name or Relationship or both.
Cause
This is expected product behavior.
Name and Relationship fields are business key of Emergency contacts. To change business key, backend will take it as DELETE + INSERT actions. Therefore, if rule applies without conditions, it will be triggered twice.
Resolution
- Add conditions in the business rule to only apply or skip the scenario of Add Emergency Contacts.
- Tips to check different scenarios in rule for Emergency contacts:
- Add. Check if previous value of Name or Relationship is null
- Update. Check if previous value of Name or Relationship is not null and other fields changes
- Delete. Check if previous value of Name or Relationship is not null and other fields are also not changed
- onSave rule is not triggered when deleting emergency contact via import
- For example, configure the business rule as following -
- Now upon the update of Name/ Relationship or any other fields, only one message is displayed for the updated value.
Keywords
Emergency contact information, Emergency contact information business rule, Emergency contact information validation, business rule executed twice, name, relationship , KBA , LOD-SF-EC-PER-ECO , Emergency Contact Details , Problem
Product
Attachments
| Emergency contact sample rule.PNG |
SAP Knowledge Base Article - Public