简体   繁体   中英

How to check a StringEdit after leaving it: in Dynamics AX?

I was wondering if it's possible to check a StringEdit-field after the user has leaved this field in MS Dynamics AX 2009.

for example:

I have a field called cliHouseNumber, and I want to check if the user has leaved this.

Create this method in the form methods;

edit String editcliHouseNumber(
    boolean set,
    String    _cliHouseNumber
    )
{
    if(set)
    {
        //It has been changed - do what you want to
        //in here...
    }

    return _cliHouseNumber;
}

Set your field property "dataMethod" to "editcliHouseNumber".

Usually the correct place is the modified method in the datasource field or the modifiedField on the table. If you want to ensure, that a field is entered use the mandatory property on the. Do not try to force the user to remain on a not entered field.

These methods will be called only when a value changed, which is usually what you want.

Also see the answer to this question .

okay, here is another option;

在此处输入图片说明

Right click the field, and override the "lostFocus" method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM