1. Implement the contract class by SysOperationValidatable
public class
ProjTransReportContract implements SysOperationValidatable
2. Add the
validate method
public boolean
validate()
{
   
boolean             isValid = true;
    ;
    if
(this.parmFiscalYear() == '')
    {
   
    // Fiscal year was not entered.
   
    isValid = checkFailed(strfmt("The fiscal year is required.
Enter a defined fiscal year to continue."));
    }
   
else if (this.parmProjId() == '')
    {
   
    // Project ID was not entered.
   
    isValid = checkFailed(strfmt("The Project Id is required.
Enter a defined Project Id to continue."));
    }
   
return isValid;
}
No comments:
Post a Comment