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, ...
Suggested Answer

Can't Import employees

(0) ShareShare
ReportReport
Posted on by 160

Trying to import Employees but getting an error:

Results. Cannot create a record in Employment (HcmEmployment). Insert not supported with the values specified for 'Employment start date' and 'Employment end date'. New record overlaps with multiple existing records.

I just used this two weeks ago!  What happened??  My input data comes from an SSRS extract... so I believe it's clean.  I did remove a bunch of records (The sql created 400 and I only want to import one.  What would cause the error??   This needs to be imported asap.

I have the same question (0)
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Ther error messsage says that that you're trying to import an employment that overlaps with another employment. You'll need to adjust the dates.

  • Suggested answer
    Elsa Guo Profile Picture
    on at
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,679 Super User 2025 Season 2 on at

    Hi Andrew,

    Do you use correct date and time format for importing?

    You can try to import data via standard entity "Employee" to create an employee in D365FO.

    pastedimage1638515037560v2.png

    pastedimage1638514995314v1.png

  • Suggested answer
    AR-01121610-0 Profile Picture
    4,967 Moderator on at

    Hy Andrew,

    as the employment of an employee is quite as a history table of employments it can not to be updated using the employee entity, instead we need to use "employment" entities. 

    The "Employment" entity itself works a little bit different to other entities as my experience this entity is not updatable for this reason.

    Inside the (outdated) Employment entiy the keys are defined like this:

    pastedimage1638600735485v1.png

    AND additional: Start date and End Date are not allowed to overlap.

    So, if a record exists with "No End date", it can not be updated as it is inside the key and usually saved with a value of "2154-12-31T23:59:59Z"

    What we need is to end the Employment using another entity where the enddate is not part of the key.

    There are two entities we could use, may be also further entities (employee leave, ...), I've not tested. 

    - Employment per company

    - Employment V2

    The keys for "Employment per company" are:

    pastedimage1638606704955v2.png

    and for "Employment V2" are:

    pastedimage1638606736890v3.png

    1) Employment per Company 

    So if you only have the "Personalnumber" you need to use the "Employment per Company" entity to update the end date of the employment of the worker.

    This works for me to use "Employment per Company" if I set the "start date" and "end date" with a time part, as this is a DateTime Field, may be this will be validated at run time.

    The time part depends also from your regional setting for time zone

    pastedimage1638607141602v4.png

    This imported Excel ended at D365FO with this:

    pastedimage1638607243166v5.png

     

    After that you can import a new employment using the "Employment" entity as the example here starting on 03.12.2021.

    pastedimage1638607420021v7.png

     

     pastedimage1638607347308v6.png

    2) Employment V2

    This entity is build in this way, that if you import an employment start date that is after the start date of the existing employment, it will set the end date of the existing employment just before the new imported start date of the employment. 

    pastedimage1638608563815v8.png

    pastedimage1638608703272v10.png

    This is of course more comfortable as the first solution as the new employment will be cretaed and also ends the existing employment automatically.

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 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans