FormDataSource.leave Method

Provides notification when the mouse pointer is moved to the next record or to another data source.

Syntax

public boolean leave()

Run On

Client

Return Value

Type: boolean
Always returns true, unless the method is overridden.

Remarks

This method is often overridden to implement record-level input validation.

The leave method can be overridden on a form data source by right-clicking the Methods node under the data source, pointing to Override Method, and then clicking leave.

Examples

The following example overrides the leave method to perform data validation before the current record is left. The method returns false if the data is invalid.

public boolean leave() 
{ 
    boolean ret; 
    ret = super(); 
    if(! salesLine.PBAItemLine::checkMandatory()) 
    { 
        return false; 
    } 
    return ret; 
}

See Also

FormDataSource Class

FormDataSource.leaveRecord Method