JmgExternalTerminalData.validateClockIn Method [AX 2012]
Part of the validation algorithm. When it is determined, that a clock in registration has been received from the external terminal, this method is called.
Syntax
private JmgExternalTerminalError validateClockIn()
Run On
Called
Return Value
Type: JmgExternalTerminalError Enumeration
The result of the validation.
Remarks
If the registration contains an absence job, the result of the JmgExternalTerminalData.validateJobIdAbs method is returned. Otherwise JmgExternalTerminalError::NoError is returned.
Examples
The following example demonstrates the use of this method.
public void validate()
{
try
{
error = this.validateMandatoryFields();
if (error != JmgExternalTerminalError::NoError)
{
return;
}
switch (externalRegType)
{
case JmgExternalTerminalRegType::ClockIn:
error = this.validateClockIn();
break;
case JmgExternalTerminalRegType::ClockOut:
error = this.validateClockOut();
break;
case JmgExternalTerminalRegType::JobStart:
error = this.validateJobStart();
break;
case JmgExternalTerminalRegType::JobStop:
error = this.validateJobStop();
break;
default:
error = JmgExternalTerminalError::IllegalExternalTermRegType;
break;
}
}
catch (Exception::Error)
{
error = JmgExternalTerminalError::UnexpectedError;
}
}