Applies to Product - Dynamics 365 Human Resources
What’s happening?
The customer is facing an issue with changing personnel numbers to a new sequence, as the option is grayed out, and they cannot delete and recreate the user. They are inquiring if there is a possibility of running a script to change the personnel number and update related records.
What’s happening?
The customer is facing an issue with changing personnel numbers to a new sequence, as the option is grayed out, and they cannot delete and recreate the user. They are inquiring if there is a possibility of running a script to change the personnel number and update related records.
Reason:
Personnel numbers already created in the system are hard-coded and are not supposed to be changed as they are referenced in many modules of the system. The option to edit the personnel number is grayed out in the user interface.
Resolution:
Personnel number cannot be changed after worker is created with a out-the-box feature.
You can change to the desired format for new entries by modifying the number sequence used for Personnel number ID. You can find the number sequence going to Human Resources> Setup> Human Resources shared parameters> Number sequence tab> Personnel number reference. Click on number sequence code and then on Edit. Make manual if you want to introduce the ID manually whenever new worker is created or define the format for the number giving automatically. Here you can find more details: Set up number sequences on an individual basis - Finance & Operations | Dynamics 365 | Microsoft Learn
In case you want to modify existing Personnel numbers in workers that have been recently created without assignments and transactions, the following script can be used. Test it in UAT before applying in production environment:
update HCMWORKER set PERSONNELNUMBER = 'YYYYYY' where recid = XXXXXXXX
Note: It is recommended that already created personnel numbers should not be changed due to their references in various modules of the system. Applying this script will not update these references
