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.
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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(); hirjiDate.set_Calendar(Calendar); dateString = dt.ToString("dd/MM/yyyy", hirjiDate); return dateString; } |
You will get :
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:
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.
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.
Search the site
Dynamics AX 2012 Event
Recent Posts
- D365FO | Cannot Connect to SQL Server Database on Your Cloud Test Machines
- Intro to Microsoft Dynamics AX in Arabic – سلسلة حلقات مايكروسوفت داينامكس إيه إكس بالعربية
- Microsoft Dynamics Launch – Sunday, 24th February – Intercontinental Hotel, Riyadh
- Files of Our AX Brains Dec 2012 Event
- It was a great day!
- Tomorrow is the day for our Dynamics AX Brains Technical Seminar
- Dynamics AX Brains December 2012 Technical Seminar
- Windows Server 2012: Built from the Cloud Up
Tags
Archives
- October 2019 (1)
- January 2014 (1)
- February 2013 (1)
- December 2012 (4)
- September 2012 (2)
- December 2011 (2)
- November 2011 (3)
- July 2011 (3)
- June 2011 (4)
- May 2011 (3)
- April 2011 (4)
- March 2011 (12)
- February 2011 (2)
- January 2011 (3)
- December 2010 (1)
- November 2010 (1)
- October 2010 (5)
- August 2010 (1)
- July 2010 (3)
- June 2010 (4)
- May 2010 (5)
- April 2010 (1)
- March 2010 (9)
- February 2010 (4)
- January 2010 (4)
- December 2009 (11)
- September 2009 (1)
- August 2009 (1)
- July 2009 (2)
- September 2008 (1)
Random Testimonial
- ~ Ziad Yehia, ERP Business Consultant at NetWays
"I have one thing to say about Amer, When you have a tough Dynamics AX question that you are not able to answer; he is the person to call..."
- Read more testimonials »