Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Importing workers/employees to Dynamics AX

Posted on by 4,029 Super User 2024 Season 2

I imported a test set of worker records but the workers are not viewable in any of the forms in AX. I suspect it's due to the code that 'hires' the worker upon selecting the 'Hire new worker' button when manually entering new workers.  Is there a bit of code that needs to be run after importing workers to 'hire' them?  Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing workers/employees to Dynamics AX

    According to my knowledge, there should be two data entities. One for Worker and another for the data into corresponding HcmEmployment table. The standard entity for Worker in D365 doesn't import data into HcmEmployment.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing workers/employees to Dynamics AX

    My research indicates entries are required in DirPersonName, DirPartyRelationship, DirPerson,DirPartyTable,HCMWorker,HCMEmployment tables.  I tried creating a worker and using that as a template but I kept receiving errors when trying to import to AX7.  In the end I had to resort to manually entering data so that all the PartyIds and relationships get created, then export, edit with additional fields, then import.  As a side note, try changing first name, middle name, last name or personnel number after a record has been created.  It appears that you can't so you have to delete and then create again.  Therefore you had best be sure all the names are correct before getting any transactions on your employee / workers. 

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Importing workers/employees to Dynamics AX

    Thanks Andre.  I asked an MSFT AX solutions architect about this issue and the way he suggested handling it is to create a data entity specifically to execute the 'Hire' code.  This is beyond my technical capability so I'm going to work with one of our developers on it.

    BTW, I checked the hcmWorkers table and the imported data is there.  However, the records do not yet exist in the hcmEmployees table, which indicated to me that there is code behind the 'Hire' button that populates one or more other hcm tables.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,219 Super User 2024 Season 2 on at
    RE: Importing workers/employees to Dynamics AX

    The employees and contractor forms in AX7 are only showing data if these persons do have an employment for the current legal entity. The workers form should display all workers, but there might be some dependency on date effective values. Like Sohaib mentioned, check the employment records.

    When you import data using the data entities, in many cases you need to alter ome settings like enabling run business logic on inserting records. The form to to this is a bit hidden. I can check how to do this tomorrow.

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Importing workers/employees to Dynamics AX

    I suspect it may be missing record(s) in HcmEmployment  Table. Each work should have one active record in this table.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: Importing workers/employees to Dynamics AX

    Thanks for the responses Sohaib and Chris.  I imported using DMF in AX7.

    I don't have access to SSMS on the VM right now so I wasn't able to check that Chris but I will when I get to a non-firewalled world.  

  • Chris Roehrich Profile Picture
    Chris Roehrich 289 on at
    RE: Importing workers/employees to Dynamics AX

    Manually enter one worker and compare the data between one you manually entered and one you imported.  Do the comparison using SQL Query or the Table Browser in AX.  This could tell you where you need to either map additional fields in DIEF or add extra code in the entity class for your DIEF entity.  Another option is to debug what the code is looking for when clicking the hires button in AX as this can tell you where in the data you need to look for differences. good luck

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Importing workers/employees to Dynamics AX

    How you have imported data?

    by DIXF or custom code etc?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans