May 2017
Intermediate to advanced
442 pages
11h 55m
English
To create a handler class to add further validation to the state machine, follow these steps:
public ConWHSVehInspStatus fromStatus; public ConWHSVehInspStatus toStatus; public ConWHSVehicleTable vehicle; public boolean Validate() { switch (toStatus) { case ConWHSVehInspStatus::Complete: if (vehicle.InspComment == '') { DictField field = new DictField( tableNum(ConWHSVehicleTable), fieldNum(ConWHSVehicleTable, InspComment)); //The field %1 must be filled in" return checkFailed (strFmt( "@SYS110217", field.label())); } break; } return true; } public void run() { if(toStatus == fromStatus) { return; } if(this.Validate()) ...Read now
Unlock full access