简体   繁体   English

离开后如何检查StringEdit:在Dynamics AX中?

[英]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. 我想知道用户在MS Dynamics AX 2009中离开此字段后是否可以检查StringEdit字段。

for example: 例如:

I have a field called cliHouseNumber, and I want to check if the user has leaved this. 我有一个名为cliHouseNumber的字段,我想检查用户是否已离开此字段。

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". 将字段属性“ dataMethod”设置为“ editcliHouseNumber”。

Usually the correct place is the modified method in the datasource field or the modifiedField on the table. 通常,正确的位置是数据源字段中的modified方法或表上的modifiedField If you want to ensure, that a field is entered use the mandatory property on the. 如果要确保输入字段,请使用上的mandatory属性。 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. 右键单击该字段,然后覆盖“ lostFocus”方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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