Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

(0) ShareShare
ReportReport
Posted on by 11,627

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.

  • Verified answer
    Satish Panwar Profile Picture
    Satish Panwar 14,647 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    Employment

  • syed baber Profile Picture
    syed baber 11,627 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    Hi Satish,

    Employment entity or Employee entity ?

    Thanks,

    Baber.

  • Suggested answer
    Satish Panwar Profile Picture
    Satish Panwar 14,647 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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
    syed baber 11,627 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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.

  • syed baber Profile Picture
    syed baber 11,627 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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.

  • Verified answer
    Satish Panwar Profile Picture
    Satish Panwar 14,647 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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
    syed baber 11,627 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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.

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,671 Moderator on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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
    syed baber 11,627 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    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
    Satish Panwar Profile Picture
    Satish Panwar 14,647 on at
    RE: Update not allowed for field 'HcmEmployeeEntity.PersonnelNumber'

    hi Baber,

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

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,684 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans