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.

5 comments:

  1. Step 2 worked, and the employee disappeared from the list, but there were still rows left in tables.
    In our 'dirty' test-load environment I had to delete a row from the WHSWorker table to remove the entry from the underlying table. Cheers

    ReplyDelete
  2. I CANT FIND OUT BY NAME I TRIED VIA EMP CODE .. THE STEP ONE IS NOT WRKOUT FR ME ..

    ReplyDelete
  3. In Dynamics 365 for Operations I am unable to edit the Employement End Date. Also I am not leveraging WHS at all, how do I ensure the worker is removed from the actual tables and not just from the form list?

    ReplyDelete
  4. Is there a way to mass delete position once the workers are removed. I receive that error when attmepting to delete the position.

    ReplyDelete
  5. I would just create a job in order to do it

    ReplyDelete