web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

(0) ShareShare
ReportReport
Posted on by 11,633

Hi All,

I am getting below error when trying to create new Employee record using Employee data entity and importing the record with blank PersonnelNumber. I am assuming that the import process would generate new PersonnelNumber using Number sequence, but it seems like it is not doing this:

 update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

Does anyone have any clue if I am missing anything or it is by design? It is weird because how can we expect the customer to provide the PersonnelNumber manually in the Excel file. I think it should generate from the number sequence as it is generating when creating a new employee record manually.

Thanks,

Baber.

I have the same question (0)
  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    hi Baber,

    Can you check your mappings for import. specify the personnel number as 'Auto generated' in mapping and then try again.

  • syed baber Profile Picture
    11,633 on at

    Hi Satish,

    Thanks for your quick response. Setting it to Auto-generated did generate the number for PersonnelNumber, but despite of this I am getting the same error. Why is that ?

    Thanks,

    Baber.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Its giving you error because its  has allow edit set to NO . Hcmemployement table  has worker as a foreign key . If you are importing employment then it assumes  worker has been  already created. Try providing personnel number which already exist and then import employment for that worker and see if it works. So sequence is first import workers  then their employments by providing personnel number.

  • syed baber Profile Picture
    11,633 on at

    Hi Sukrut,

    I used the HcmWorker entity this time, but even with this I am getting similar error which is mentioned below:

    update not allowed for field 'HcmWorkerEntity.PersonnelNumber'

    Please note that I have set PersonnelNumber to be auto generated.

    Any clue what I am missing.

    Thanks,

    Baber.

  • Verified answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    Hi Baber,

    Tried this again on my env.. without even setting the personnal number set to auto-generate and it works well. Here is what you need to do first:

    1. Go to workers form, create worker manually.... make sure personal number is getting generated automatically.

    2. Create worker export so you get template, import in AX... there is no personal number in file. data gets into staging.. if you look at staging, there is no personal number here as well.

    3. import.. worker gets created under "Inactive workers". You will also notice that personal number is now populated.

    Give this a try. I tried on latest released and it worked as expected.

  • syed baber Profile Picture
    11,633 on at

    Hi Satish,

    I have already performed the exact same steps earlier that you mentioned, but I can see the PersonnelNumber in the export file and it also shows in the map. Not sure how it is not showing for you. It is the field in HcmWorkerEntity. But I will give it a go one more time and see if that makes any difference.

    Thanks,

    Baber.

  • syed baber Profile Picture
    11,633 on at

    I think I have figured out the issue. The party number was populated in the export template. I have removed the PartyNumber from the file and then used it to import and it worked. If the import routine sees the PartyNumber, it assumes that it is an existing record and tried to update the record instead of creating new one and hence it throws the error.

    The new worker is now showing under Inactive worker. How can I make it appear under Workers form or how to activate the worker ?

    Thanks,

    Baber.

  • Suggested answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    Use employment entity now along with the personnel number that you already created, once record is created, it will move from pending worker to Workers form.

    If you want to see how this works in D365 first, go to inactive workers form, click on employment history. Create a new record. once created, you will notice that the record gets disappeared from inactive workers form and is now available on workers form. Give this a try.

  • syed baber Profile Picture
    11,633 on at

    Hi Satish,

    Employment entity or Employee entity ?

    Thanks,

    Baber.

  • Verified answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    Employment

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans