Worker profile was detleted - how to assign her old time sheets to the new profile

Hi,

I have a queestion on the Time sheets issue that we are having. We use Dynamics ax 2012 CU3. One of the worker’s profile/record was accidentally deleted and her Time sheets still exist and but are still tied to her the deleted worker profile. When I try to find the TSTimesheetTabl.Worker in the HCMWorkder.RecId it couldn’t find it.

Later on a new profile has been created and there is no link between her old time sheets and her new worker profile.

I found the both new Profile and old profiles (HCMWorker.RecIds) in the HCMEmployment.worker field.

Issue: When the user try to pull her old timesheets she doesn’t see her name on her old time sheets (that were created with her old profile).

Is there a way in the rich client or in the AOT to tie her old Time sheets to the here new profile so she can get paid for she had worked for?

Thanks in advance,

Dev

The normal GUI is intended for using a system with consistent data, not for doing such a fix.

AOT is about code and metadata, while your problem is in data.

If you’re able to identify the data to fix, probably the easiest way is to update the RecId reference directly in database. You must be careful, but it looks like the optimal solution for your task.

Hello Martin,

Yes, it is the data issue and I think I have identified the data that needs to be fixed. The data that needs to be fixed is in the TSTimeSheetTable.worker field. Because there are 5 Time sheets that were created with the user’s old profile which had 563xxxx011 value for TSTimeSheetTable.worker column. If I search the for the same value in the HCMWorker.Recid column it couldn’t find it. So, the 563xxxx011 should essentially be the HCMWorker.Recid value for the old profile(I also looked searched for both the recids in the HCMEmployment.Worker column and both of them exist in there).

Her new profile HCMWorkder.RecID is 563xxxx619. I tried to change the TSTimeSheetTable.Worker from 563xxxx011(old profile recid) to 563xxxx619 (new profile recid) by selecting the Personal number in the TSTimeSheetTable.woker drop down but it is throwing an error saying: Cannot enter timesheets for Employee XXXXXX in an infolog.

Any clue what I might be missing or Am not doing it right?

Thanks,

Dev

I don’t know the status of the timesheets - AX may prevent you from changing them because there are some related transactions or so. You could easily bypass it if you actually followed my suggestion, but now I must vote against it for a moment.

It’s possible hat you didn’t identify all data to change and changing just one place would keep your data in inconsistent state. Please analyze the data once more and tell us about the status of the timesheets if you need a help from us.