Uncategorized

Dynamics AX 2012: Warming up for presales demo

To really impress potential buyers of Dynamics AX, it is important that we are capable to show that AX 2012 responds fast. We normally use the Contoso hyper-v demo environment, and our laptops have limited resources. Starting a demo on a cold system, we often see that forms takes some time to operate in optimal performance. If you already have opened a form, it is much faster the second time you open it.

So how can we give the users a view of a fast system without manually opening all the forms prior to the demo?

We can warm them up J. I use the following job-script to open and close all the forms I’m planning to use. I just traverse through the AOT, and open the form, and then I close them again.

static void WarmupRF(Args _args)
{
    //This code is for "warming" up all RF* forms and code I have in the VAR-layer
    UtilElements e;
    TreeNode treeNode;
    FormRun formRun;
    Args args = new Args();

    while select e
        where e.utilLevel  == UtilEntryLevel::var    //<-- spesify layer here
        &&    e.recordType == UtilElementType::Form  //<-- and only forms
        &&    e.name like "RF*"                      //<-- I only want the forms that starts with the prefix RF*
        {
            try
            {
                treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(e));
                args.name(treeNode.AOTname());
                formRun = ClassFactory.formRunClass(args);
                formRun.init();
                //formRun.run();   //<-- No need to run the form, but sometimes it can load the data
                formRun.close();
            }
            catch
            {
                Infolog.clear();
                continue;
            }
        }
}

The code must be modified to suit what you want to “warm-up”, but you get the idea.

This will make you demo go much more smooth, and you truly show the potential and performance of a warm Dynamics AX system.

Happy DAX’ing

I appreciate that I can be a part of this worldwide blog community—as a consultant working from Norway, the blog lets me share more than 20 years of experience with Microsoft Dynamics 365. Along the way, I participated in developing retail, PDA/RF, barcoding, master data, kitting and WMS-solutions for Dynamics. My blog focuses on my deepest interests and expertise: along with a 360 degree view of digital transformation topics, I welcome opportunities to dive into retail and intercompany supply chain automation, logistics, and production—everything that is moving around in a truly connected enterprise. As Enterprise Architect on Dynamics 365, I specialize in strategic development and planning for corporate vertical solutions and works to build international networks that increase knowledge and understanding for Dynamics 365. As an advocate for both providers and customers, I'm committed to ensure that customers constantly changing needs are meet, and I see community as key for increasing expertise. I welcome you to connect with me.

4 comments on “Dynamics AX 2012: Warming up for presales demo

  1. Hi Kurt, this Rocks!!! Thank you so much. MD

    Like

  2. Sven De Coninck

    Hello Kurt,

    great tip, this is going to save me a lot of “clicks” prior to each presales demo.

    many thanks for sharing
    Sven

    Like

    • Thanks Sven. Here is another “version” of the code, where it load the 30 most used forms, based on the Element usage log (SysUtilElementsLog);
      SysUtilElementsLog SysUtilElementsLog;
      FormRun formRun;
      Args args;
      int i;

      args = new Args();

      while select Name from SysUtilElementsLog order by UseCount desc
      where SysUtilElementsLog.Type == UtilElementType::Form
      && SysUtilElementsLog.UseCount > 0
      && !(SysUtilElementsLog.Name like “sys*”)
      {
      i++;

      if (i>30)
      break;
      else
      print strFmt(“Warming up %1”, SysUtilElementsLog.Name);

      try
      {
      args.name(SysUtilElementsLog.Name);
      formRun = ClassFactory.formRunClass(args);
      formRun.init();
      //formRun.run(); //<– No need to run the form, but sometimes it can load the data
      formRun.close();
      }
      catch
      {
      Infolog.clear();
      continue;
      }
      }
      pause;

      Like

  3. Hi Kurt,

    Nice post 🙂

    Regards
    Arun

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: