SAP Knowledge Base Article - Public

2564438 - How to raise an error message if the association of one object is null?

Symptom

You have a MDF objects and you have created an association.

You then made this association required but you have noticed that the error message triggered is not clear do the user and you want to set a user friendly error message.

Error without treatment:

KB1.jpg

Error with treatment:

KB2.jpg

Environment

SAP SuccessFactors Employee Central (EC) - All Versions

Reproducing the Issue

  1. Go to manage data;
  2. Try to create the object without the mandatory association;
  3. See the error message appearing;

Resolution

In order to make this error message treatment you only need to execute three steps as explained below:

  1. Create a message definition with the error message you want to show. This is done under Manage data>MessageDefinition.

KB3.jpg

  1. After creating the message you just need to create a rule as the example below for your object. Let's say you want to trigger the message when creating a Department, then the rule must have base object Department:

KB4.jpg

  1. After that you need to add this rule in the object as Validate Rule:

KB5.jpg

After you perform those three configuration steps, you'll have an user friendly error message for missing associations.

Keywords

associations error message business rule , KBA , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors Employee Central all versions