How to point the datasource to the currently seleted record

abhishekpareekabhishekpareek Member Posts: 150
edited 2010-01-18 in Dynamics AX
Hi All,

I have a scenarion :

1) I have to find out dynamically on some forms of Ax for the Datasource and also point this datasource to currently selected record in Grid of any form.

Example :
1) Form name is SalesTable
2) Find out the Datsource dynamicaly for this form.
3) Point the datasource record to currently selected record on the form.
4) Send this record to Common object so that it can be send in the form of XML.

Thanks,
ABhishek Pareek

Comments

  • MikerMiker Member Posts: 105
    Args        args;
        formRun     formRun;
        ;
    
        args = new Args();
        args.name(formstr(SalesTable));
        //args.record(); // you may send/get record buffer
        args.parm('ÊÇÊ0010741'); // or you may use the parm
    
         formRun = classFactory.formRunClass(args);
         formRun.init();
         formRun.run();
         formRun.wait();
        // formRun.closedOk();
    

    When you selected record in the form, define is simple - SalesTable.SalesId (for example)
    going to Europe
Sign In or Register to comment.