JmgJobBundle.reset Method [AX 2012]
Resets the job bundle. All added jobs are removed and the employee's active jobs are reloaded from the database.
The following example shows how the reset method is used in the JmgJobBundle.new Method.
public void new( JmgWorkerRecId _worker, boolean _continueBundle = false, boolean _askForFeedback = true, boolean _showInfo = true, JmgRegistrationSetup _registrationSetup = null){ JmgEmployee jmgEmployee; HcmWorker hcmWorker; worker = _worker; // Check that employee is active. jmgEmployee = JmgEmployee::find(worker); hcmWorker = HcmWorker::find(worker); if (jmgEmployee && jmgEmployee.Active == NoYes::No) { throw error("@SYS327447"); } else if (jmgEmployee && jmgEmployee.Active == NoYes::Yes) { taEnabled = isConfigurationkeyEnabled(configurationkeynum(Jmg)); } else { throw error("@SYS327448"); } super(); askForFeedback = _askForFeedback; showInfo = _showInfo; registrationSetup = _registrationSetup; registrationDate = JmgProfileSeconds::getSysDate(); registrationTime = JmgProfileSeconds::getSysTime(); this.reset(); this.continueBundle(_continueBundle);}
Community Additions
ADD
Show: