Symptom
The requirement is to have a validation rule so that information from grid portlets such as National ID, Email, Phone Information or Job Relationships, etc. is always present/cannot be deleted.
But the rule does not popup any message upon deleting the concerned values/records.
By downloading rule trace we see it fails: "Error: Collection Filter can only be applied to a collection, not class"
Similar rules work when used Employee Information Base Object and executed in Add New Employee.
Environment
SAP SuccessFactors Employee Central
Reproducing the Issue
Sample scenario:
- You create a Business Rule for base object: Job Relationships;
- The rule should throw an error if Name field is Null;
- You add it as onSave in employmentInfo, in BCUI;
- Navigate to an employee's profile;
- Go to Job Relationships portlet, delete all the existing entries and expect that upon save, the rule will get triggered and the error message will display;
- However, nothing happens and the changes are successfully saved;
- When you download the Rule trace you notice the following error: "Error: Collection Filter can only be applied to a collection, not class com.successfactors.hris.bean.eo.EmpJobRelationsEO".
Cause
On grid portlets, it is not possible for a business rule to be executed when its base object is null.
Resolution
As per the current product design, this is only supported for New Hire scenarios.
If this is an important subject for your business requirements, kindly consider submitting an enhancement request, by following the instructions listed on KBA 2090228.
Keywords
ECT-16673, ECT-195127, grid portlet, business rule, delete all records, delete entries, validate, null, throw error, warning message, cannot be blank, Error: Collection Filter can only be applied to a collection, not class , KBA , LOD-SF-EC-PER , Person Data (All Person Data Types) , LOD-SF-EC-JRL , Job Relationships , LOD-SF-EC-PER-NAT , National ID - Config, Rules, RBP, UI , LOD-SF-EC-PER-EML , Email Info - Config, Rules, RBP, UI , LOD-SF-EC-PER-PHN , Phone Info - Config, Rules, RBP, UI , Product Enhancement