Wednesday 15 October 2014

checkfailed in ax 2012

checkfailed can be used for precisely while executing the validation method to return a error message instead of throw error mressage

use like :ret = checkFailed(“enter the vaule between 40 to 50.”);

or
public boolean validate()
{
    boolean ret;

    ret = super();

    if(!tablename)
    {
        return checkFailed("it does not have any vaulue ");  
    }

    return ret;
}


thow message is used in the business logic where if we encounter some error messages then the execution should be stopped.

In validation we should never use throw error message as it will  stop the further validation steps.

3 comments:

intercompany PO multiple product receipt by x++

public void processStampICPO(PackingSlipId _deliveryNote,                             Transdate _deliverydate,                             ...