Introduction
Lots of new features are available in the latest release of Oracle HCM Cloud Application (Release 13 20A). One of the feature which has been introduced in the latest release is “Add Business Object Field Validation Rules” under “Autocomplete Rules” within “HCM Experience Design Studio”
“Add Business Object Field Validation Rules” as the name suggests allows us to fire various validations based on the data value stored in a business object field. I can understand if you could not make out the above statement (honestly speaking I was not able to understand the same too). But, we will try to understand the same with an worked out example.
In this example, we will try to demonstrate how to throw an error when a specific field (First Name) holds a specific value (Test). In other words, we will try to build a custom rule such that whenever some one tries to enter the string value of “Test” in the First Name field (during name change action) an error message will be displayed.
Worked Out Example
As a first step we should ensure that we login to the application with a user having appropriate credentials (user having access to create Sandbox) and then we would need to create a sandbox.
Navigation : Login To Application -> Navigator -> Configuration -> Sandbox
Once we click on Sandbox a new page will open where we can choose the different tools and create a sandbox (we will name it as “AH_AutoCompletionRules)
Next we will need to navigate to Home Page and Click on “HCM Experience Design Studio”
Once we click on the link (highlighted in yellow in above screen-shot) new page will open and we should choose the “Autocomplete Rules” . There are different actions against which we can choose the AutoComplete Rules and they would appear on the drop-down list on the work area
Also there are different types of rules which can be created namely:
- Add Business Object Defaulting Rule
- Add Business Object Validation Rule
- Add Business Object Field Validation Rules
- Add Business Object Field Modification Rules
Creating Add Business Object Field Validation Rules
For this example we would choose “Person Name” and “Add Business Object Field Validation Rules”. Once we click on those a new page will appear. We would need to populate the following fields
And this completes the rule creation part.
Changing the First Name of an Employee
In the next step, we will search a employee and try to change his “First Name”
Once we click on “Update” it will ask for the New Effective Date (which would have a default value of current system date 3/9/20 for this example)
Once we click on “Ok” a new page will open which would hold the old values
Now we will change the value of First Name from “Andrew” to “Test” and try to save the same.
And we could see that the moment we enter “Test” and tab out of the “First Name” we encounter an error.
Summary
So, this is how we can make use of “Business Object Field Validation Rules” to add custom validation on different business object field values. One can also build custom validations based on a combination of two, three or more fields as long as they belong to same business object. A typical example could be to ensure that if Title field is populated then say Prefix should be left Blank or vice versa, but more on that on some other day. For now I hope you all enjoyed reading this post and would be using this feature in your upcoming / ongoing projects. Thanks all for your time and have a great day ahead.
Comments
Regards
RSS feed for comments to this post