classes and table involved in HR Module for hiring a employee in ax 2012

Hi all,

Can anyone tell me the classes and tables involved in the process of hiring a employee from a applicant in human resource module in ax 2012.

Thanks in advance,

Try debugging and let us know if you have any specific questions.

Start looking from here, \Forms\HcmWorkerNewWorker\Methods\closeOk

Hi Kranthi,
Thanks for the reply, Actually I want to copy all the attachments of the relevant applicant and application to the newly created employee, So I wanted to know where the code for copying the attachments from there to employee form can be implements. Please suggest me a solution.

Thanks in advance,

I don’t see any code that does the copy of attachments. You can use the \Classes\Docu\copy method to copy the attachments from applicant table to worker table. (for the best place to write your code, try debugging the methods i suggested)

Hi kranthi,
there is no functionality of copying the documents yet, it is a new customization but I want a help to suggest at which place can the copying code can be implemented such that after hiring a applicant as employee it copies the attachments. please do suggest.


Which of the above mentioned methods is called in your case?

Hi Kranthi,
First \Classes\HcmWorkerTransition\newHireHcmWorker is called then \Forms\HcmWorkerNewWorker\Methods\closeOk is called, which is best to place the code for copying attachments please suggest.

Thanks in advance,

In the above method the new Worker get created (by calling newHireHcmWorker), after that you can copy the documents from HRMApplication to HCMWorker (see example code below)

if (newHcmWorker.recId
&& element.args().dataset() == tableNum(HRMApplication)
&& hrmApplication.RecId)
Docu::copy(hrmApplication, newHcmWorker);

Hi Kranthi,

Thanks a lot, Do we need to add
DocuActionarchive = new DocuActionArchive();
archive.add(docuRef, _path);

while using Docu::copy(hrmApplication, newHcmWorker);

Please suggest an answer for this.

Thanks in advance,

You can use \Classes\Docu\copy (or) \Classes\Docu\copyDocument based on your requirement.
Copy method will create new DocuRef but uses the same DocuValue. copyDocument will create new DocuRef and DocuValue (it copies and createdsnew files in case if there are any attachments).
Most of the case in AX the Copy method is used. (Example - copying documents from Purchase requisition line to purchase order line)