JmgRegistrationParameters::newFromJmgTermReg Method [AX 2012]
Creates and initializes an instance of the JmgRegistrationParameters class based on a JmgTermReg record.
Syntax
client server public static JmgRegistrationParameters newFromJmgTermReg(JmgTermReg _jmgTermReg)
Run On
Called
Parameters
- _jmgTermReg
Type: JmgTermReg Table
A JmgTermReg record from which to initialize the class.
Return Value
Type: JmgRegistrationParameters Class
A new instance of the JmgRegistrationParameters class.
Remarks
The following table describes the parameter settings.
costCategory |
Set to the value of JmgTermReg.costCateory . |
errorSpecification |
Set to the value of the JmgTermReg.errorSpecification field. |
goodQuantity |
Set to the value of the JmgTermReg.goodItems field. |
jobIdAbsence |
Set to the value of the JmgTermReg.jobIdAbs field. |
jobPilot |
Set to the value of the JmgTermReg.jobPilot field. |
reportAsFinished |
Set according to the value of the JmgTermReg.finishedCode field. |
startQuantity |
Set to the value of the JmgTermReg.startItems field. |
wrkCtrId |
Set to the value of the JmgTermReg.resNo field. |
Examples
The following example creates an instance of the JmgRegistrationParameters class that is based on the last registration made by the specified employee.
JmgTermReg jmgTermReg;
JmgRegistrationParameters regParams;
select firstonly jmgTermReg
order by RegDateTime desc
where jmgTermReg.Worker == jmgWorkerRecId;
regParams = JmgRegistrationParameters::newFromJmgTermReg(jmgTermReg);