Tuesday, November 13, 2012

AX show container in infolog

There are times where you want to show a container in a window. For example, if you are implementing AX 2012 for Retail, you can send containers back to the POS.

For example, you may want to run a job in AX that mimics the retail transaction services (RTS) call that the POS is calling and see the raw data in AX thus totally eliminating the need for the POS in the testing process. I used this scenario in the below code using a dummy RTS method.

    Object      FormRun = classFactory.formRunClass(new Args(FormStr(SysConView)));
    FormDesign  design;
    Container   c; // The container we want to view

    formRun.init();

    if (!prmIsDefault('Caption'))
    {
        design = formRun.design();
        design.caption('Caption');
    }

    // Use an RTS call and build/return a container using a customer id
    c = RetailTransactionService::containerExample('ARCA-000007');

    formRun.setContainer(c);
    formRun.run();
    formRun.detach();     

The result from this code will look like:

4 comments:

  1. Great job! Thank you for this small tutorial, it's just what I needed to solve my problem with microsoft dynamics ax. I'm glad to find your blog :)

    ReplyDelete
  2. Hi! Thank you for providing this information! I like your blog and think it's very useful for me:) if you want to know all the news about microsoft dynamics 365 so you should try to look at this page)))

    ReplyDelete
  3. I think that thanks for the
    valuable information and insights you have so provided here.

    ReplyDelete