Whenever I am trying to insert a record in HcmEmployment table through a .csv file, it is giving following error in infolog.
Cannot create a record in Employment (HcmEmployment). Invalid value specified for 'Employment end date'. It cannot be greater than or equal to the 'Employment end date' of the first record.
I finally deleted all the records from HcmEmployment table and only tried to insert one record, but it is stikll showing the above error.
*This post is locked for comments
Hi Syed,
We are importing Employee and Contractors through DIXF in Dynamics 365.
Some of the records have error as below.
"Results. Cannot edit a record in Employment (HcmEmployment). 'Employment start date' can only be updated to today or a value in future in change tracking mode. "
Could you please suggest, what could be the reason.
Thanks,
Kiran
Hi Mahesh,
I would not recommend you to change this property in HcmEmployment table. This could impact the functionality, whereever this table is being used in the system. Instead, I would suggest you to insert the records in HcmEmployment table similar to the manual creation of records when you try to enter data through Forms. You can query the last date effective record and then insert the next record based on fromDate and ToDate of last record. To better understand the read and write operations in Date Effective table, have a look at below post:
msdn.microsoft.com/.../gg843767.aspx
Please verify and let me know if you have further queries.
Thanks,
Baber.
To both Baber and Sohaib,
Now I somewhat understood the way the HCMEmployment table is taking data particularly for ValidFrom and ValidTo dates.
But the requirement of the client is that we need to insert data as per there requirements.
How can I achieve this?
I guess
For the
HcmEmployment_AK1 Index in HcmEmployment Table, I need to change following properties?
ValidTimeStateMode=NoGap ?
Okay I will check Baber.
Hi Mahesh,
Do you mean that you have more fields in your import file thant what is available in the staging table? You can add more fields to the staging table and can map that to target entity.
Please let me know if you have further queries in this regard.
Thanks,
Baber.
Yes Baber I tried to use DIXF framework
But the problem with this framework is I was not getting all the fields in the staging table?
Same problem with my colleague to.
Finally my manager said me to use X++.
So I went to it only.
Hi Mahesh,
Why are you not using Data import export framework to import records into HcmWorker? The DIXF framework will take care of all validations.
Please let me know if you need any help related to that.
Thanks,
Baber.
Thanks Sohaib I will check it. I don't know why Google is not displaying this search result .
although focus should be to resolve original problem, despite here goes the code to create employee
community.dynamics.com/.../155550
you can extend it as per your need
Baber. Do you have any code to import Employee data into dynamics using X++ like HCMWoker and so on.
The links we have in Google are very less like Krishnablogspot and all.
If possible please help.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156