How to change StringEdit value in overridden method leave()

axaptadynamics-ax-2009dynamics-ax-2012x++

I have a StringEdit and overrided the leave-method.

public boolean leave()
{
    boolean ret;
    ;
    info("leaved");
    this.text("leaved");
    CliHouseNumber.text("leaved");
    ret = super();
    info("leaved");

    return ret;
}

The problem is that the 2 infologs are fired but the value of CliHouseNumber doesn't change. Why does the value stay the same?

INFO:

  • The field is linked to a DataSource and a DataField

Best Solution

As requested, your correct solution:

Set the DataField property of the edit box to empty, and set the EDT property to the correct type. Otherwise, you are only allowed to set in values that appear in the DataField; anything else you try and set will be rejected.

Related Question