Browsing all articles tagged with .NET Archives - Amer Atiyah, Microsoft Dynamics 365 Blog

In a previous post, I descriped in deatils how to gte (and set) Hijri date in Microsoft Dynamics AX 2009. In that post I have shown how to get Hirji date in Dynamics AX by calling a SQL function from X++.

A calleague of mine has also came up with another great idea to handle the Hirji date using the CLR Interoperability. The standard Dynamics AX 2009 comes with a set of very important .NET libraries referenced to be used automatically in Dynamics AX 2009.


References in AOT

 What you could use out of those libraries: System.Globalization library of .NET framework. But of course, you have to use a string to show the value of that date since you cannot get a Hirji date (with its values like 1430 as a year) and assign it to an X++ date datatype.

Check out this code to have the Hirji date converted from X++ gregorian date:


 display STRExtendedDT ExpieryDate_H()
    System.Globalization.Calendar           Calendar = new System.Globalization.HijriCalendar();
    System.Globalization.DateTimeFormatInfo hirjiDate;
    System.Globalization.CultureInfo        cultureInfo = new System.Globalization.CultureInfo("ar-SA",false);
    System.DateTime                         dt;
    STRExtendedDT                           dateString;
    dt = this.ExpieryDate;
    hirjiDate = cultureinfo.get_DateTimeFormat();
    dateString = dt.ToString("dd/MM/yyyy", hirjiDate);
    return dateString;

You will get :) :

Hirji date


Microsoft has added a very useful functionality in the new release of Microsoft Dynamics AX 2009 that is: Workflow. I have explored many articles by Microsoft and others about Workflow in Microsoft Dynamics AX 2009. For the technical articles part, all of them are describing the workflow in a technical format that prevents the reader from seeing the whole picture of this functionality that has been delayed a lot. This is so important to be known.

Microsoft did not implement the workflow inside Microsoft Dynamics AX itself, they preferred to use WWF (Windows Workflow Foundation) that has been released with the .NET Framework 3.5.  WWF is a new feature that builds and executes workflows inside .NET applications. WWF workflow engine, the one that runs the workflow inside Microsoft Dynamics AX 2009, is published and configured in the IIS.  The following diagram shows you how this happens:

Workflow engine in Microsoft Dynamics AX 2009

Workflow engine in Microsoft Dynamics AX 2009

By this, Microsoft has gained the advantage of the new functionalities that would be added later on WWF without upgrading Microsoft Dynamics AX itself (for most of the cases at least).  And this is a great example of what you can do when using .NET business connector of Microsoft Dynamics AX.

In the following picture, you could see that workflow runtime, currently, is residing inside IIS.

Microsoft Dynamics AX Workflow Runtime

Microsoft Dynamics AX Workflow Runtime

Someone might ask: why did’nt Microsoft lunched the workflow runtime on the AOS of Dynamics AX.  Actually Microsoft is planning to do so in the soonest (this might be in Microsoft Dynamics AX 2010). But they have made it on IIS because the AOS is written in a native code, not in a managed code.  And since WWF is part of “very managed” .NET environment, it’s time and effort consuming for them to make such integration. So they simply put the workflow runtime on the IIS till they completely convert the AOT into managed code.

You guys could benefit from a video that has been recorded in PDC 2008. Josh Honeyman, a Senior Development Lead at Microsoft, shows how workflow is implemented in Microsoft Dynamics AX 2009 and its future. To watch the video, press here.

Dynamics AX 2012 Event

Recent Posts



Random Testimonial

  • ~ Mohammad A-Awami, Dynamics AX Specialist at WorleyParsons

    AlAwami"I worked with Amer for WorleyParsons. I found him very cooperative. He is able to help me in a lot of issues that related to ax. His ability to solve the problems is fascinating me. It is so fast and done on the best practice. His ability on business analysis and implantation are done on the best methods."

  • Read more testimonials »