mfp's two cents

...on Dynamics AX Development!

  • mfp's two cents

    X++ in AX7


    These days the veil is being lifted at Convergence in Barcelona for the upcoming release of AX. This is the cue to bloggers to start spreading the word: AX7 is coming!


    I'm addicted to AX; it's been a major part of my entire professional life. As a developer that means I spend my days writing X++ code – the past few years on the AX7 platform. And life is simply more fun.


    X++ developer – the AX7 way

    I'll write a blog post on a new feature in X++ in AX7 every day between now and Christmas.





  • mfp's two cents

    Announcing Cumulative Update 10 for Microsoft Dynamics AX 2012 R3


    Microsoft Dynamics AX 2012 R3 CU10 is now available to our customers for download on Lifecycle Services, CustomerSource and PartnerSource. Cumulative Update 10 build number is 6.3.3000.110.  To download CU10 from LCS, select an R3 project and click the updates tile.

    For installation instructions, download the Installation guide for cumulative update 10 for Microsoft Dynamics AX 2012 R3.

    For more information, see here.


  • mfp's two cents

    Reimagining Business Applications with Microsoft Dynamics AX


    Cloud: Yes, HTML5: Yes, Visual Studio: Yes, Coming soon: Yes – Yes – Yes!

    Learn more here.

  • mfp's two cents

    Moving to Lyngby



  • mfp's two cents

    Number Sequence auto-cleanup causing blocking


    Recently a customer experienced a daily time timeout in their warehouse operations. It occurred around 10.30 every day and lasted for a few minutes. Meanwhile all warehouse operations were blocked. 

    It turned out that the culprit was a number sequence configuration. One of the many features in the AX number sequence framework is to automatically clean up unused numbers for continuous number sequences.   This feature is great for number sequences that are infrequently used.  However, for the high volume number sequences this can cause blocking problems.

    When generating a new number the auto-cleanup feature will test to see if it is time for clean-up, and if it is it will commence the clean-up right away –  – and the clean-up can take minutes.  Meanwhile SQL will hold locks prevent anyone from accessing the same number sequence.

    Here is a setup of a number sequence that daily will run the auto clean-up, and potentially lock the system meanwhile.


    And here is a job to detect similar issues in your installation:  

    static void FindNumberSequencesCausingLocksDuringCleanup(Args _args)
        utcdatetime currentSystemTime = DateTimeUtil::getSystemDateTime();
        NumberSequenceTable ns;
        while select ns
            where ns.Continuous == true &&
                  ns.CleanAtAccess == true &&
            if (DateTimeUtil::getDifference(currentSystemTime, ns.LatestCleanDateTime)
    > ns.CleanInterval*3600)       
                info(strFmt("Every %1 hour %2 will lock during cleanup, last time: %3",

    Options to consider:
    1. Does this number sequence need to be continuous at all?  Non-continuous number sequences are must faster, and do not require clean up!
    2. Is the automatic clean-up required to run automatically? It can also be run manually from the Number sequences form for example outside peak hours.
  • mfp's two cents

    Dynamics AX 2012 R3 CU9 is available


    Today marks the release of yet another cumulative update for Microsoft Dynamics AX 2012 R3. Microsoft Dynamics AX 2012 R3 CU9 is available for download on Lifecycle Services, PartnerSource and CustomerSource.


    For detailed information on the release of Microsoft Dynamics AX 2012 R3 CU9, please refer to the Dynamics AX In-Market Engineering blog.

    For more information about the improvements in WMS/TMS see the SCM team’s blog.

  • mfp's two cents

    Using the batch framework to achieve optimal performance


    Recently I learnt how powerful the batch framework in AX is – and discovered how to improve performance of long running operations.

    Most long running operations in Dynamics AX can be scheduled to run in batch.   In most cases you can explicitly define a query to select which data to process.  It is often simple to create a single query that selects all the data to process and then schedule the operation for batch.  Doing it this way will start one batch operation that process the data piece by piece. It works, it is simple to maintain – but it’s not necessarily fast.

    Instead consider defining multiple queries that each covers a portion of the data to process, and then schedule them all to run in batch at the same time!  Now suddenly you have parallel processing.

    Here is a real life example.

    In Dynamics AX 2012 R3 we had a customer with 30,000 items that needed replenishment in their picking warehouse. They used fixed locations for each item, and used Min/Max replenishment.  The replenishment operation in AX is defined using a template. The template consists of lines, each with a query to specify items and location to replenish.

    The original setup we deployed was a single replenishment template covering all 30,000 items. The total execution time was 2hr31m:

    Then we created a new template with a query that covered about half the items, and changed the original template to cover the other half. We scheduled both to start at the same time. Not surprisingly they completed much fast. Almost in half the time. Total execution time was 1hr21m:

    Repeating the pattern, we split the replenishment into 8 templates. Another drop in total execution time was observed. Down to just 40 minutes:

    At this point the system was quite loaded. CPU averaged 80% and SQL had constantly a few tasks waiting – that is a good thing, the hardware is meant to be exercised.


    With a few simple configuration changes the overall execution time was cut by a factor 4. 

    This pattern can be applied many places – they key caveat to look out for is logical dependencies between the batches created.  In the example above, it is important that two batches are not replenishing the same item or the same location. That could lead to one batch waiting for another batch to complete. The implementation will of course be transactional safe, even if there are dependencies between the batches. If there are dependencies it may not yield the same impressive results, and could result in some batches getting aborted.

  • mfp's two cents

    Microsoft’s new domicile in Denmark – first impressions


    This week I had the chance to visit the building site in Lyngby where the new domicile for Microsoft Denmark is under construction.

    I’ve been driving past it a few times and been impressed by the building’s modern and bold look – so I was curious to experience a tour on the inside.


    From the outside it appears to be an office building with a number of floors. Once I entered the building I was surprised by the light and feel of spaciousness. Inside each “tower” is an open atrium offering a direct view to sky and allowing a lot of natural light to enter.



    As you enter the building you will obviously notice the big inviting stairway. But also pay attention to all the light entering from windows. This is a semi-clouded morning in February in Denmark. The pictures are taken with my Lumia 920 Windows Phone (no flash or extended exposure time), and there were just a few artificial light sources. The building is designed to allow natural light to enter from all sides (including the roof) – and it really makes a world of difference.

    As I’m typing this up I’m looking at my almost flicker-free fluorescence lamps at MDCC – I’m not going to miss them.



    Here is one of the open offices where we will build the next generations of Dynamics AX. Again, notice the windows, the openess and all the light.


    As you can tell from the pictures, there is still a lot of fit and finish pending  – yet, if at all possible the visit left me even more excited about this year at Microsoft in Denmark.

  • mfp's two cents

    Technical Conference 2015 – Sessions available for offline watching


    All sessions from this month’s conference in Seattle are now available on Customer Source.    

    Like all previous Technical Conferences, each session was recorded, and can now be enjoyed at your convenience.

    As I’m now working on the SCM Inventory and Warehouse team, allow me do a bit of shameless promotion. We had a fantastic conference, with a lot of great sessions:
    What's new in warehouse management and manufacturing for Microsoft Dynamics AX 2012 R3 CU8
    Labels in the new Microsoft Dynamics AX 2012 R3 warehouse management
    Packing station and containerization processes in the warehouse management system for Microsoft Dynamics AX 2012 R3
    Planning and execution for the transportation management system in Microsoft Dynamics AX
    Post execution and interaction with transport representatives in Microsoft Dynamics AX
    Using Microsoft Dynamics AX 2012 R3 warehouse management in a manufacturing environment
    Warehouse exception handling in Microsoft Dynamics AX 2012 R3
    Warehouse RF scanners and Microsoft Dynamics AX
    ​WMSI and the new Microsoft Dynamics AX 2012 R3 warehouse management system
    WMSII to new Microsoft Dynamics AX 2012 R3 warehouse management

    And finally my favorite (a lot of good general insights if you are dealing with performance problems):
    Performance challenges when implementing the new advanced warehousing system in Microsoft Dynamics AX

  • mfp's two cents

    SQL–More memory and CPU is not always a win


    All computer programs will run better when adding more memory and CPU cycles – right?  Not necessarily true.

    Assuming everything else is equal, then more memory and CPU will be a win; however, all computer systems have finite resources, also memory and CPU. Granting more to one program (or service), will take it away somewhere else.

    SQL is no exception, in fact it will happily consume all the resources you grant it – at the risk of starving other systems, including the OS.


    You can control how much memory SQL can use through the MaxServerMemory property. Setting it too low, means you are throttling SQL – setting it too high and you are throttling the OS.  Despair not, help is near: Here is a blog post written by Tara Shankar Jana – with a script, that will give you the optimal setting.

    CPU – Priority boost

    It may be tempting to give the SQL process a priority boost. But don’t do this! Ever! Doing this will starve any other process (including the OS processes), and it will not make the system perform better – in most cases it will be significantly worse.

    Here is a blog post by Arvind Shyamsundar on the topic: Priority boost details and why its not recommended

    If you want to disable priority boost, you can do it using this sql script:

    sp_configure 'priority boost', 0
    reconfigure with override

    One more thing…

    Since you are reading this, you probably want to get the best performance out of SQL on the hardware available. Check one more thing: The power plan!  You likely bought the hardware for your server to use it, so make sure to set the power plan to High performance – also on any VM hosts.

    Cindy Gross has written a blog on the topic.


    What has this got to do with Dynamics AX?

    Nothing and everything. The three guidelines above apply to any use of SQL Server – including when SQL is used with Dynamics AX.

    I recently visited an AX customer with performance problems. It turned out that SQL was granted 100% of the memory on the box, it was set to run with priority boost, and the power plan was set to balanced. The first two due to best intentions, the last due to this being the default setting. This starved the OS for resources, making overall performance of the system unpredictable – some simple queries would take seconds to complete, and blocks were observed too. Getting these settings right fundamentally changed the behavior – it was like night and day.

    Kudos to Tara for educating me on these topics.

Page 3 of 22 (216 items) 12345»