30 Kasım 2011 Çarşamba

AXAPTA modified method sometimes works twice

If combobox value selected with lookup and there is a data source refresh in method modified, modified method works twice. Another person faced this situation and unfortunately had not found a solution.
public void modified()
{
    ;
    super();
    info("111");
    salesLine_DS.research(true);
    salesLine_DS.refresh();
    info("222");
}
I found a solution for that and applined mine. I put a variable at class declaration method and:

public void modified()
{
    ;
    super();
    if (hasChanged) //for twice call bugfix.
        return;
    hasChanged=true;
    info("111");
    salesLine_DS.research(true);
    salesLine_DS.refresh();
    hasChanged=false;
    info("222");
}

Hiç yorum yok:

Yorum Gönder