Non Primary Address Approval Issue - Null Object Reference in Fusion HCM
SYMPTOMS
-----------------------
Person Address Change approval is failing when a non-primary address is being added or deleted.
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Login to Fusion HCM as user
2. Add / Delete a non-primary address in Person data.
3. It triggers a Person Address Change transaction approval which fails.
CAUSE
-----------------------
Null value errors in Approval Transactions come for attributes and objects whose value has been left as blank in Person and Assignment pages and it is advised to either avoid them in approval rule setup or handle null value before using them in expression.
If the attribute you're evaluating in the condition is optional, users might not have entered something for that attribute in the UI. For your rule to work properly, it's highly recommended that you first have a line in the condition that checks if the attribute isn't blank. So that means you select the attribute, select isn't as the operator, enter null, click the icon at the end of the line, and select (...) to get an and. Then the next line would be the condition that you're evaluating the attribute for.
SOLUTION
-----------------------
We need to add the null condition checks in the approvals especially if we are using a field which can evaluate to a null value as in this case "PrimaryFlag".
This can be identified using Diagnostics Report (Fetch Transaction Details -- Self-Service Data Integrity Framework for Common Flows (Doc ID 2680832.1))
Null Condition can be added automatically using the checkbox called "Automatic build a null condition" in the Approval Rule Editor Page.
- Navigate to Tools > Transaction Console > Go To Approval Rules tab.
- Search for required approval rule (Change Personal Information)
- Click on the configure Rules
- Select the Rule where it is failing as identified in Diagnostics Report.
- On the bottom, click on “Configure Rule Conditions”
- In the editor, on the top right check the box “Automatically build a null condition”
- Click on the Condition / Expression where there is error as in this case “PrimaryFlag”. Edit the condition even though no changes required.
- After clicking “ok” button a pop-up appears to add the null conditions. Click “Yes” to it.
- This adds the null condition automatically to the rule.
- Click Save and Submit.
- Retest the transaction approval.

Comments
Post a Comment