Technical Articles
Validation of Dependents in Benefits
In this blog post, we will see how can we validate the dependents details while employee claims for a benefit. Here we will take the scenario of Marriage Benefit/Gift.
Requirement
The employee should not be able to apply for Marriage Benefit/Gift if the spouse is not updated in the Dependents/ Family Details Portlet.
Approach
We are going to validate this with the help of a business rule.
Procedure
Write a Business rule with the scenario Rules for MDF Based Objects and purpose as Validate.
Select the base object as Benefit Employee Claim.
This rule actually compares the count of dependents of the user who is going to claim the benefit.
Here ‘1’ is the external code for picklist value ‘Spouse’. The count will be zero if the employee has not updated the spouse. Since we have kept count less than 1, the system throws an error while the employee tries to claim the marriage gift/benefit.
Assign this rule in the Object Benefit Employee Claim at the Save Rules section. This can be done by the Configure Object Definitions tool.
Configuration is completed!
Result
Now let us test the configuration
- An employee who has not updated the Spouse in the Dependents details.
2.Employee tries to claim the Marriage gift/benefit and system throws error as per the configuration.
This function can be used in many other scenarios other than benefits, wherever we want to count the number of dependents.
Hope this blog post was helpful.
Stay happy. Thank You!
Hi Josmer Joseph , well done. As you write more and more, you'll master the 'art' of writing. Keep up the good work 🙂
I'll also refer to an additional and small configuration step to your great work i.e. message definition.
Thankyou Faizal!
Hi Joseph,
Thanks for nice explanation, i m seeking help in benefits on date validations for only few benefit types, now system is allowing to apply benefits on same date for multiple requests for same benefit type, i m trying to validate with look up function for dates, i m not sure why look up function is not working for date validations, Could you please help me on this if you have any workaround.
Regards
Sampath Reddy
Hi Joseph,
We want to put a validation on benefits. Scenario is if leaves start and end date along with approved status then only allow to apply for Business Per diem else throw an error. We are getting error when comparing worker id from benefits with Leave Request User. Pls help
Best Regards,
Radhika