How to Change Non-Primary Work Relationship to Primary Using Worker.dat (Oracle Fusion HDL)
Introduction
In Oracle Fusion HCM, an employee can have only one Primary Work Relationship at any given time.
During data corrections or integrations, you may encounter a requirement to change an existing non-primary work relationship to primary.
Oracle Fusion allows this update using HCM Data Loader (HDL) by passing specific attributes in the Worker.dat file.
This blog explains:
-
When this scenario occurs
-
Required HDL attributes
-
Sample Worker.dat template
-
What happens after upload
📌 When Do You Need to Change Primary Work Relationship?
This scenario usually arises when:
-
Incorrect primary work relationship was loaded initially
-
Multiple work relationships exist (global transfer / rehiring)
-
Primary flag needs correction after data migration
-
Integration updates require switching the primary work relationship
✅ Important Rules to Remember
-
A person can have only ONE primary work relationship
-
When you mark a non-primary relationship as PrimaryFlag = Y, Oracle will:
-
Automatically change the existing primary work relationship to non-primary
-
-
The change must be effective-dated using DateForPrimaryFlagChange
🗂️ HDL File Used
👉 Worker.dat
This update is performed at the WorkRelationship business object level.
📄 Sample Worker.dat Template
Scenario
| WorkRelationship Before Changes |
Change an existing non-primary work relationship to primary.
METADATA|WorkRelationship|LegalEmployerName|DateStart|PersonNumber|ActualTerminationDate|NotifiedTerminationDate|LastWorkingDate|WorkerNumber|WorkerType|PrimaryFlag|DateForPrimaryFlagChange
MERGE|WorkRelationship|US Legal Entity|2015/10/26|XXTEST1|||||XXTEST1|E|Y|2015/10/26
📌 Key Points About the Sample
-
PrimaryFlagis set to Y -
DateForPrimaryFlagChangemust be:-
On or after the work relationship start date
-
A valid effective date
-
-
The previously primary work relationship is automatically updated to non-primary
-
No manual update is required for the old primary record
🚀 After Upload – What Happens?
Once the Worker.dat file is:
-
Zipped
-
Loaded via My Client Groups → Data Exchange → Import and Load Data
-
Successfully completed
Oracle Fusion will:
-
Update the selected work relationship as Primary
-
Demote the earlier primary work relationship to Non-Primary
-
Maintain data integrity without conflicts
| After Changes |
⚠️ Common Errors & Tips
❌ Error: Person can have only one active Primary Work Relationship
✔ Ensure you are using:
-
PrimaryFlag = Y -
DateForPrimaryFlagChange
❌ Error: Effective date mismatch
✔ Make sure:
-
DateForPrimaryFlagChange is valid
-
No future-dated conflicts exist
✅ Best Practices
✔ Always validate existing work relationships before update
✔ Test in lower environments first
✔ Use effective dates carefully
✔ Avoid updating Worker METADATA unless required
📌 Conclusion
Changing a non-primary work relationship to primary in Oracle Fusion HCM is fully supported using HDL, provided you pass the correct attributes in the Worker.dat file.
By using PrimaryFlag along with DateForPrimaryFlagChange, Oracle automatically handles the transition and ensures only one primary work relationship exists.
🔗 Related Articles & Internal Links
Common Worker HDL Errors in Oracle Fusion HCM
A complete guide to troubleshoot Worker.dat issues including Primary Work Relationship, GradeId, and SourceSystemOwner errors.How to Fix data using Worker HDL
Step-by-step solution to load Worker HDL loads.BI Publisher eText Reports – Delimiter vs Fixed Position Learn when to use Delimiter-based vs Fixed Position-based eText templates in Oracle BI Publisher.
It is amazing and wonderful to visit your site.Thanks for sharing this information
ReplyDeleteWorkday Online Training in Hyderabad
Workday Online Course
Great article about hdl .Thanks for this article.
ReplyDeletedevops advisory services
devops services company in india
devops consulting services
devops services in india
devops implementation services
devops services
agile devops consulting