Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Passing value between forms

$
0
0

Dear experts,

I'm new to x++ & ax world, i have this forms :

I made this forms because i'm learning how to pass values between forms. From many sources i have read, i need to override clicked method in parent form's ok button, and then place code inside init() in child form. But, everytime i clicked ok, form B doesn't show me anything just empty. Can anyone help me solve this? Thanks Here's my code :

Form A :

void clicked(){
    FormRun formRun;
    Args args;
    super();
    args = new args();
    args.parm(ATable_A.text());
    args.name(formStr(bform));
    formRun=ClassFactory.formRunClass(args);
    formrun.init();
    formrun.run();
    //formrun.wait();
    //formrun.detach();
    atable_ds.refresh();
    atable_ds.executeQuery();
}

Form B :

public void init(){
    str any;
    
    super();
    
    if(element.args()){
        any = element.args().parm();
        BTable_b.text(any);
    }}


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>