SAP Knowledge Base Article - Public

2795612 - Error message via business rule - Recruiting Management


Users are able to go ahead with the functionality / task after the error / warning message displayed as per the raise message - business rule.


SAP SuccessFactors Recruiting Management

Reproducing the Issue

  1. Navigate to Admin Centre > Manage Data > Create New > 'Message Definition'

  2. In the 'Text' Field, enter the text you wish to display when the error message pops up, for example 'You cannot use Special Characters in Address Fields'

  3. Give the Message Definition a 'Name' and 'External Code' > Status = 'Active' > Save

  4. Next, create the Business Rule and attach the Error Message, to do so;

  5. Navigate to Admin Centre > Configure Business Rules > Create New Rule > Select 'Basic' Rule

  6. Give the Rule a sensible name such as 'Special_Character_Check' > Select 'Base Object' 'Addresses Model' (Change the Base Object as necessary depending on the fields you want to check, e.g for Personal Information Fields, select Base Object 'Personal Information Model')

  7. In the 'IF' statement of the rule, select the 'Matches()' function > 'is equal to' 'Boolean' 'Yes'

  8. In the 'String to be checked' box, scroll to the field you wish to have checked for Special Characters > Click + > Select 'Value'

  9. In the 'Regular Expression' box, Select 'Text' > Add the following Regular Expression in the Text Box;
    Note: To add more characters to be checked in the Regular Expression, you can add them between the '[]' brackets with a comma as necessary. To remove characters to be checked, simply delete them from between the '[]' brackets.
    Note: You must include the .* in front of the [ ] and behind the brackets, else the rule will not work as expected.

  10. To add more fields to be checked in the rule, select the dropdown next to the eye > Add > Parent Or > Click '+' (Keep clicking '+' to add additional fields) > Repeat Steps 6-8 until all the required fields you wish to check are in the rule

  11. In the 'THEN' statement of the rule, select 'Output Type' 'Raise Message' > In 'Message' enter the Name of the Message Definition created > Set Severity to 'Error' > Click 'Save'

  12. Add the rule to the Address Information Portlet by Navigating to Manage Business Configuration > select HRIS Element 'homeAddress' > Scroll to 'Trigger Rules' > Select 'Home Address Model' as the Base Object > Set the rule 'onSave' > Enter the Name of the rule under 'Rules' > Click 'Save'
  13. After doing so, you will receive the error message when trying to add a special character into the selected fields


Expected Behaviour


This is how the product is designed. Raise message is just a prompt message which does not block the functionality


Business Rule , Raise Message , SAP SuccessFactors HCM Cloud , KBA , LOD-SF-RCM-RUL , Recruiting Rule Issues with MDF Platform , Problem


SAP SuccessFactors Recruiting all versions