Showing posts with label validate method in AX 2012 SSRS report. Show all posts
Showing posts with label validate method in AX 2012 SSRS report. Show all posts

Thursday, 21 January 2016

How to add a validate method in AX 2012 SSRS report

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;
}