SAP Knowledge Base Article - Public

2576913 - How to Configure Attachment Field to be Mandatory - Employee Central

Symptom

  • The attachment was able to be used in a rule during a termination from 1705.  This rule is not longer working.  The rule is not recognizing when an attachment has been added.
  • The attachment field is set required in manage business configuration/XML for employment information portlet.

There is no 'mandatory sign' and you can still save data without populating the field.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Employee Central

Reproducing the Issue

The Attachment field is set as Required in Manage Business Configuration.

Although the asterisk sign is showing beside the field in the UI, you can still save data without populating the field.

No warning / validation error message appears

Cause

Configuration issue: The attachment is not correctly configured.

Attachment field will not have a value until at the end of save action, so if we try to check its value in onSave rule, it will not work.

Please try the below steps to meet the requirement here.

  1. Configure a rule with "Job information model" as base object.
  2. In the rule, check the value for event reason field and based on its value, set required property for attachment field to Yes or No.
  3. Add it as an onChange rule for event reason field in jobInfo element.

After this, on termination screen, once you select a value for "event reason" field, based on its value,

required property for attachment field will be set, and it will throw the validation accordingly.

Please follow an example Configuration below in the Resolution section

Resolution

The scenario detailed in here is to require attachment on termination event.

 

  1. Create the Event Reason field in BCUI.

Create Event Reason.png

  1. Create a rule based on your requirement

Create your rule2.png

 

Create your rule.png

  1. Associate the rule to the Event Reason

associate the rule to the event reason.png

  1. You can also add this directly to SDM and this is how it would look like in XML

This is how it would look like in SDM.png

 

  1. In this scenario, the rule for attachment is set to trigger on  event Reason = Termination.
    1. Notice here that Employment Attachment is not mandatory

Notice1.png

    1. Notice how Employment Attachment is now mandatory once the termination event is selected

notice 2.png

    1. if you attempt to submit without attachment you get an error message

finally error.png

 

If you still have an issue after this please don't hesitate to contact our Support Team (LOD-SF-EC)

Keywords

Attachment, Mandatory field, rule, required , KBA , LOD-SF-EC-JOB , Job Information , How To

Product

SAP SuccessFactors Employee Central 1705 ; SAP SuccessFactors Employee Central 1711 ; SAP SuccessFactors HCM Core 1708