A worker can have several positions but only one can be primary. Where do I find that flagging in the system tables. I found onw called HCMWorkerPrimary position. but It does not contain all the flagged positions.
A worker can have several positions but only one can be primary. Where do I find that flagging in the system tables. I found onw called HCMWorkerPrimary position. but It does not contain all the flagged positions.
I am not sure - It should be present in the HcmWorkerPrimaryPosition table.
On the worker primary position form - You will have Primary position flag - This is the display method - You need to debug the code and see how the flagged is marked for the particular employee from HcmWorkerPrimaryPosition table.
Thanks,
Girish S.
Hi Girish, Thanks for the quick reply. How ever I found several cases which the Worker has two positions and one "Flagged" as primary in the front-end, but when I search for that worker name on the HcmWorkerPrimaryPosition he or she do not appear on the list at all. Do you know if there is a reason for that?
Hi David,
Please check this thread, it has the answer you are looking for.
IsPrimary is not a table field or method but it is a datasource method in HcmWorkerPositions Form under HcmPositionWorkerAssignment Datasource.
As mentioned in the thread, you can find a primary record of worker from HcmWorkerPrimaryPositionTable using ValidTimeState in code (ValidFrom and ValidTo).
Hi David Molina,
There is no Flag in d365 to identify the worker primary position.
If there exist a record in HcmWokerPrimaryPosition table then that position is primary position for that worker.
Suppose there are 2 positions assigned to the worker 0001(Primary position) and 0002. So 0001 will be present in the HcmWorkerPrimaryPosition table(It wont save position recid, You have RecId of HcmPositionWorkerAssignment table).
Thanks,
Girish S.
André Arnaud de Cal...
292,234
Super User 2025 Season 1
Martin Dráb
230,994
Most Valuable Professional
nmaenpaa
101,156