JmgTermJob_HRMAbsence.new Method [AX 2012]
Creates a new instance of the JmgTermJob_HRMAbsence Class.
Syntax
public void new([boolean _forUpdate])
Run On
Called
Parameters
- _forUpdate
Type: boolean
Denotes whether the HRMAbsencecode record or HRMAbsencecodeGroup record should be selected for update. Optional.
Remarks
Don't use the new method to instantiate an instance of the JmgTermJob_HRMAbsence class. Instead, use the JmgTermJob::construct Method or the JmgTermJob::constructJobTable Method.
Examples
The following code example creates an instance of the JmgTermJob Class with the job ID 100000057. If the job ID is an absence job ID, the result is typecast to be of type JmgTermJob_HRMAbsence.
JmgTermJob jmgTermJob;
JmgTermJob_HRMAbsence absenceJob;
jmgTermJob = JmgTermJob::construct('100000057');
if (jmgTermJob.jourRegType() == JmgJourRegTypeEnum::Absence)
{
absenceJob = jmgTermJob;
// Do absence-job–specific tasks.
}