Hi Andre, Brandon & Sohaib,
I'd really appreciate all your help. I have to say that I've learned a lot since the day I joined to our AX forum. It's not only where I can learn & get help from all members, but also a place to verify or test what I've learned everyday. Again thanks a lot, all of you.
Back to my issue, first I was really confused about "personnel number" last night. Spending hours & I could go to anywhere. Just a loop in loop etc. This morning, it looks better after reviewing all your advise. In SQL Management Studio, I repeat my search in all tables that I suspect: HcmWorker, HcmEmployment, HcmPersonPrivateDetails, DirPerson, DirPartyTable, LogisticsElectronicAddress & a few dimension tables including DimensionAttribute, DimensionAttributeValue, etc.
Finally searching data with PersonnelNumber, CreatedBy, RecID, Name, Alias, etc. (i.e. field names), I found unwanted records, for some reason, cannot be shown in Worker form in AX. These records exist in HcmWorker, HcmEmployment, DirPerson, DirPartyTable, HcmPersonPrivateDetails & LogisticsElectronicAddress .
One thing that I cannot explain myself is that after remove record in HcmWorker & other tables (except DirtyPartyTable), I also got error message "This personnel number is already in use. Enter a new personnel number". Then I made a test: Instead of using the first name & last name I should use for my new employee, I entered different first name or last name like Thai123 (so I can recognize them later & remove out of AX database). Guess what: AX accepted even though I used the same personnel number. So I had to remove my test record manually in the above table & then try to enter a new worker again with correct first name & last name with the correct personnel number. This time I got the same error message again. I tried to search in dimension tables, but couldn't found. In fact, I didn't reach to step to enter financial dimensions at all & therefore no records exist & relate to the new worker above.
Again I had to repeat task to remove. This time I did faster because no record at all in HcmWorker & other tables (except DirtyPartyTable). When searching in DirtyPartyTable, I found unwanted record (even though there's no personnel number value in it). After deleting it, I can enter the new worker successfully (with the same personnel number from HR).
I feel better now.
Thanks
Thai