Partilhar via


FormDataSource.leave Method

Definition

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

public:
 virtual bool leave();
public virtual bool leave ();
abstract member leave : unit -> bool
override this.leave : unit -> bool
Public Overridable Function leave () As Boolean

Returns

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.

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

Applies to