Showing posts with label button click. Show all posts
Showing posts with label button click. Show all posts

Saturday, 19 October 2019

RUN REPORT FROM BUTTON CLICK IN AX 2012

RUN REPORT FROM BUTTON CLICK IN AX 2012 
void clicked()
{
    Args                args;
    ReportRun       reportRun;
    CustTrans       custTrans;
    ;
     select firstonly custTrans where custTrans.recid == '1231232';
    args    = new args();
    args.name(reportstr(ReportName)); // Report name to be called
    args.record(custTrans); 
    args.parm(custTrans.transID); // In case there are additional paramters..
    reportRun = classFactory.reportRunClass(args);
    reportRun.init();
    reportRun.run();
}

Thanks,
Vikas Mehta

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...