Wednesday, May 13, 2015

Worker cannot be deleted while dependent Position worker assignments exist. Delete dependent Position worker assignments and try again

While trying to remove a worker from the HR module we got the following error and AX would not allow us to remove the worker.

"Worker cannot be deleted while dependent Position worker assignments exist. Delete dependent Position worker assignments and try again"


Currently in order to fix this you need to do the following

Step 1
Company/Human resources/Common/Organization/Positions/Positions
Find the worker name > edit the record > go to Worker assignment > End > choose a date time that has already happened unless you want to wait for the nightly job


Step 2
Company/Human resources/Common/Workers/Workers
Find the worker name > edit the record > employment (menu on left side) > Employment details > edit > change employment end date to same time as the one listed in step 1. Once you hit ok the record will be removed


I didn't get a chance to test this but executing step 2 might actually execute step 1 as well. I just don't have any more records atm that I can verify this on.