Download Demonstration Toolkit for Microsoft Dynamics AX 2009 Pre-Release

March 27, 2008

There has been much hype around the soon to be released Microsoft Dynamics AX 2009. Certain companies were given the privilege to get their hands on Microsoft Dynamics AX 5 Community Tech Preview 3 (CTP3). Do note that the name was the initially expected Microsoft Dynamics AX 5 instead of Microsoft Dynamics AX 2009 which it is currently called.

Demonstration Toolkit

Microsoft Dynamics AX Demonstration Toolkit cover

It has been a common practice for Microsoft Dynamics to issue Demonstration Toolkit for Microsoft Dynamics AX in the form of Virtual PC (VPC) image. The Demonstration Toolkit for Microsoft Dynamics AX 4.0 SP1 for example was distributed in the form of two DVDs. The package comes with marketing material and presentation decks for different industries, and VPC Images for Microsoft Virtual Server as well as Microsoft Virtual PC.

Microsoft Dynamics has done the same for the Pre-Release of Microsoft Dynamics AX 2009. The Demonstration Toolkit for Microsoft Dynamics AX 2009 Pre-Release is available for download at Demonstration Toolkit for Microsoft Dynamics AX 2009 Pre-Release (requires PartnerSource login).

You will need Microsoft Virtual PC to use this toolkit. The good news is it is a freeware available for download. Get your free copy of Microsoft Virtual PC 2007 downloaded to run the Demonstration Toolkits.

Disk Space Requirement

Usually this toolkit is distributed in DVDs. Hence, do expect the download size to be huge. The files for this toolkit has been compressed and split into three archive files. The three files have a total size of 7 GB. The three files shall be downloaded into the same folder to be extracted. In other words, you will need an additional 7 GB or more to get the extracted files. So we are looking at no less than 14 GB of free hard disk space required to complete the task. Do note that the extracted files are all we need.

I have not the hard disk space to even download the files hence has not tried out. Those that have extracted the files could let us know how much space is required to extract the files.

Expiry Date

Another thing to take note is the expiry date of the VPC image. The Microsoft Dynamics AX 2009 CTP3 license in the VPC image will expire on August 31, 2008. The Windows of the VPC image on the other hand will expire on June 6, 2009.

What is in the VPC Image?

Apart from the Pre-Release version of Microsoft Dynamics AX 2009, there is a wealth of software installed and properly configured in the VPC image. Some of them are its pre-requisite whereas the rest are required to demonstrate the complete set of Microsoft Dynamics AX 2009 functionalities.

You will also find Microsoft Office Ultimate 2007, Microsoft Office Sharepoint Server 2007, Microsoft Silverlight, Microsoft Office Visio Professional 2007, Microsoft SQL Server 2005, and Microsoft Visual Studio 2008 Professional just to name a few. The complete list is available on its user guide.

Recommended Laptop Requirement

This demonstration toolkit is designed to allow us to perform demo to prospects. We are expected to run it on our laptop. I would like to note the system requirement for the computer that host the VPC image. Companies purchasing laptops for their team members could take the following into consideration.

ProcessorPentium 4 with 1.2 GHz processor or higher
RAM2 GB minimum, 4 GB recommended
Hard disk space30 GB minimum

Final Thoughts

I guess it is good to get our hands on Microsoft Dynamics AX 2009 if we have the capacity. Those that has not the luxury of Microsoft Dynamics AX 5 CTP3 installer should really find ways to get this Demonstration Toolkit to work. Although it is intended for demonstration, it is a completely working package.

My experience performing demonstration with the VPC image from Microsoft Dynamics AX 4.0 SP1 Toolkit has not been very pleasant. This should be due to my laptop not meeting the requirement stated above. It requires quite a bit of patience.

Service Log on Account - Local System, Network Service or Domain User Account

March 25, 2008

Service Log On account is an important yet often overlook configuration. Just as the account you login to your windows workstation determines your authority over resources, the service log on account defines what the service is capable of accessing.

Windows Service

Windows Services are long-running executable applications that run in their own Windows sessions. They are designed not to require user intervention hence do not show any user interface. Those working with Microsoft Dynamics Ax actually work directly with a few Windows Services. The Application Object Server (AOS) of Microsoft Dynamics Ax is implemented as a Windows Service. The database server be it Microsoft SQL Server or Oracle runs as Window Service.

You will find the list of Window Services installed on your computer from the Services Management Console. It is found under Administrative Tools > Services. The following image shows the Services Management Console.

Services Windows Management Console

Log On Account

When we configure a distributed system with Windows Services, Service Log On account is one thing we should pay ample attention to. We do not usually spend effort on this for a standalone all-in-one installation we usually have in our laptop for demo and some development. When the pieces of the software are installed over a few servers however, there will be resources over the network that we need the Windows Service to access.

Microsoft Dynamics Ax AOS for example could be installed on a separate server from the Application files. This is a common model in production environment where more than one AOS is necessary. In this case, the Service Log On Account for these AOS will need rights to the application files over the network. On top of that, the AOS gains access to the database server using this credential too. The rights over database objects are determined by this Log On account.

Apart from that, we would not want these services to interfere with resources within the server itself for security reason. Services for information system such as those database servers are rather prone to attack. It is important that the account that starts this type of Windows Service has sufficient rights over the resources it requires and no more than that.

The following figure illustrates an example of Service Log On Account setting. This is found on the Log On tab of the Service Property dialog box.

Service Property Page - Log On Tab

Account Options

You may choose among three types of accounts to start a Windows Service; the Local System Account, the Network Service Account, or a dedicated Domain User Account.

Local System Account

The local system account is a Windows operating system account that has full administrative rights on the local computer but has no network access rights. If your Windows Service interacts with network resources, this account is not an option. Moreover, this account has too many privileges on local computer. It is not recommended for use with Windows Services we are dealing with.

Network Service Account

The Network Service account is a special built-in system account that is similar to an authenticated user account. This account has the same level of access to system resources and objects as other members of the Users group. Services that log on under this account will use the credentials of the computer account to access network resources. This includes accessing database. You have the option to set database access rights using computer account only.

Apart from the issue in defining database access, this account has too many privileges for the services we are discussing here since it inherits the rights from the Users group.

Domain User Account

Domain user account is an account we create manually in the Active Directory. Privileges could be configured exactly to our needs. We may define resources rights across servers. We could even configure database access specific to the need of the Windows Service.

If we have multiple instances of Dynamics Ax AOS serving different purposes for example, we may have different accounts for the AOS services. This allows us to give rights to the correct set of application files and database only. We will not have to worry even if different teams of people are working on the instances.

This is the most widely used account for starting such service under production environment. It fulfills the requirement of giving all the rights required and not more.

Conclusion

Decision on what account to use very much depends on the environment. However, the general rule of thumb is to have domain user account for services such as Dynamics Ax AOS, SQL Server, SQL Server Agent, etc. in production environment. The flexibility and independence of this account type is helpful.

When you assign a user account to start a Windows Service, additional rights required for this purpose are assigned automatically. This is the case for Dynamics Ax AOS service. SQL Server services on the other hand require more setting than other services. The Log On account for them should be assigned during installation or through the SQL Server Configuration Manager in order to have those setting performed.

Schedule Future Post in Blogger

March 22, 2008

I supposed many of us have heard those using Wordpress "boast" about the ability to timestamp posts written to be published at a future date. Those using Blogger service could edit the post timestamp too but it does affect the actual published date. The post will be visible to everyone once you press the button publish post even if you enter a future date.

This is about to change soon. The ability to schedule posts to be published at a future date could be found at Blogger in Draft. In case you are not aware of its existence, this is a place where new features are tested and fine tuned before they are included in Blogger. You login to Blogger in Draft through the URL http://draft.blogger.com instead of the usual http://www.blogger.com. You will get a similar interface with additional features under development and test.

Blogger in Draft

The Changes

This new feature will add a status to the post list called Scheduled. You add posts to the status Scheduled by entering a future date to Post date and time then press the Publish Post button. You will get a message shown in the following figure instead of the usual message.

Scheduled Post Message

The following figure illustrates the posts list with this feature. Notice the additional status in the filter. The date shows the date it is scheduled to be published.

Blogger Scheduled Posts List

Conclusion

This feature is important for those that would like consistent rate of update to their blog. You would not want to adjust your schedule and go nowhere without Internet access just to update your blog consistently.

I have personally tried this feature. It works fine thus far. Having said so, I am not a heavy user looking at the post frequency of Dynamics Ax Associate. You may have your hand on it by logging in to Blogger through Blogger in Draft.

Update - 2008 May 05: This feature is available in Blogger Live since May 1, 2008. No visual changes compared to the test version.

Run External Application from Dynamics Ax

March 20, 2008

Calling up external program from Dynamics Ax can be something very interesting to audience during introductory training and demo. Once in a while, I will encounter associates asking if it is possible to run external program, open word document, open a URL in an external browser, etc. from within Dynamics Ax. Usually they will show a sign of immense enthusiasm when I show them how it is achieved. It is like their imagination is exploring all sort of creative ways to make use of this facility.

The interesting part is that executing external application is fairly effortless in Dynamics Ax. X++ is capable of calling Microsoft Windows Application Programming Interface (API). The common functionalities of the Win API have been built in classes WinAPI, WinAPIServer, WinGDI and WinInet. Running external application could be achieved through the static method WinAPI::shellExecute.

Static Method WinAPI::shellExecute

This method takes six parameters where five of them are optional parameters. The following code segment shows the interface of this method.

client static int shellExecute(
    Filename _lpFile,
    str      _lpParameters      = '',
    str      _lpDirectory       = '',
    str      _lpOperation       = #ShellExeOpen,
    int      _show              = #SW_SHOWNORMAL,
    boolean  _waitForCompletion = false
    )

The interface might look complicated but the first parameter is usually all we need to assign. It is sufficient to achieve most of the scenarios. The second parameter allows us to execute an executable with parameters. We will look at examples where this second parameter comes into play later.

Class SysShellExecute

The class SysShellExecute facilitates calling WinAPI::shellExecute. This class has a main method that call the method WinAPI::shellExecute using args.parm() as the first parameter. This enables WinAPI::shellExecute to be called from menu item with ease. This is important Dynamics Ax bring up windows through menu item. Menu item works with buttons with ease.

The following figure shows the property dialog of a menu item using SysShellExecute. The menu item shown will open an Internet Explorer browser when executed.

SysShellExecute Menu Item Property

Opening a File or URL

You shall not encounter any issue running application with class SysShellExecute. However, I have received enquiry when it comes to opening a file or a URL. I do not want to go into the ways they have tried. Basically opening file and URL are equally simple.

1. Default Application

Windows has associated different file type to a default application. We just need to execute the file name in order to open that file with the default application. The following figure shows the property page of a menu item that opens the website Dynamics Ax Associate in the default browser.

Open URL with SysShellExecute Menu Item

2. Specific Application

The previous approach opens the file or URL in the default application. There are cases where you need to specify the application to open the file with. You may achieve this with static method WinAPI::shellExecute.

Let say the default browser for your computer is FireFox and the website you are opening requires Internet Explorer. You may use the following code to open the URL with Internet Explorer.

WinAPI::shellExecute("IEXPLORE.EXE",
    "http://axassociate.blogspot.com");

Conclusion

The examples given above cover the execution of Windows Internet Explorer and opening of URL. They work similarly with a Word Document, Excel Spreadsheet, etc.

Report with Sum at Header using Duplicated Query

March 15, 2008

Your report needs the summation of some fields at the Header portion but you do not want to hack the report classes to achieve that.

Dynamics Ax subtotal is available only at the footer. If you need it in some other section, you would have to find a way around. We will look at an approach where the report query is duplicated for the necessary calculation at the section header.

The demo subsequently will produce the report illustrated in the following figure. The section footer is the subtotal produced by the standard report. The section header on the other hand shows the output of the approach suggested.

Dynamics Ax Report with Sum at Header

Motivation

There are ways to achieve this. The use of duplicated query is motivated by the following factors.

  • It could be applied to existing report without affecting the overall structure. In other words, no changes will be required on the data source and other sections in the report.
  • The calculation is in accordance to the filters set by the user without additional work.
  • The report query will be handled by Dynamics Ax report subsystem while we will only work on the duplicated copy of the query.

Technique Highlight

Basically we will have two copy of the same query. At the section group header, we will loop the duplicated copy until the next header group is reached. The necessary work is performed while we loop and the value to be shown at the group heading is prepared prior to executing the group header. Then the report subsystem will take over and loop the original copy of the query.

The following code segment illustrates the technique explained above.

// loop as long as within the same subheading group.
do {
  custTransLoop = qrHead.get(custTransLoop.TableId);
  if (custTransLoop.AccountNum == CustTrans.AccountNum) {
    rSum += custTransLoop.AmountCur;
  }
  else {
    break; //heading group changed.
  }
} while (qrHead.next());

mrSum = rSum; //value prepared for heading.

super(); //execute group heading.

The following code segment illustrates how the report query is duplicated into a QueryRun object.

qrHead = new QueryRun(element.query());

Demo

We will create a simple report with CustTrans as the only data source to demonstrate the highlighted approach. We dissect the whole process into three sections. The first will cover creating report while the second is regarding adding subtotal just to verify the outcome of the calculation. The final section is the one that cover the approach recommended. Those that are well versed with Dynamics Ax reporting tool may opt to skip the first two sections.

Create Report

The following steps cover report creation. Alternatively, you may use the Report Wizard to perform this.

  1. Create a new project to group objects if you have not.
  2. Right click on your project and select New > Report. You will have a report with the name Report1 created.
  3. Right click on Data Sources > Query > Data Sources and select New Data Source. Change the Table to CustTrans under the Property Page.
  4. Expand the node CustTrans(CustTrans) and right click on the node Sorting. Select New > Field. Ensure the Field is AccountNum. Change the properties AutoHeader and AutoSum to Yes.
  5. Right click on the Designs node and select New Report Design. You will see a new node named ReportDesign1 with a child node named AutoDesignSpecs.
  6. Right click on ReportDesign1 and select Generate Design. You will see a node named Generated Design added. You will also see a node named Section Group: CustTrans too.
  7. Expand the Section Group: CustTrans and right click on Body:CustTrans_Body. Select New Control > Field Group from CustTrans. Change the field group's DataGroup property to AutoReport.

Validation preparation

The following steps add a subtotal to a field for verification.

  1. Change the AutoFieldGroupOrder property to "Save the fields' properties" for the field group.
  2. Expand the Group and find control named Real: CustTrans_AmountCur and change the SumAll property to Yes.
  3. Right click on Footer: CustTrans_Footer and select New Control > Sum. Change the properties of the newly added for Table to CustTrans and Field to AmountCur.

Sum at Header

You now have a report with subheading. The following steps demonstrate the approach mentioned earlier.

  1. Add the following declaration to classDeclaration of the report. The classDeclaration will now look like the following.
  2. public class ReportRun extends ObjectRun
    {
      AmountCurDebCred  mrSum;
      QueryRun          qrHead;
    }

  3. Add a new method to Header: CustTrans_Header and copy the following code to it.
  4. display AmountCurDebCred SumAmtCur()
    {
      return mrSum;
    }

  5. Then add a new a control with the display method to the Header. This could be done by dragging the method and dropping it at the Header: CustTrans_Header node.
  6. Override the method executeSection() of the header with the following code. The method CustTrans_Header:executeSection() shall looks like the following.
  7. public void executeSection()
    {
      CustTrans  custTransLoop;
      real       rSum;

      // dupplicate the query on first execution of the header.
      if (!qrHead) {
        qrHead = new QueryRun(element.query());
        qrHead.next();
      }

      // loop as long as within the same subheading group.
      do {
        custTransLoop = qrHead.get(custTransLoop.TableId);
        if (custTransLoop.AccountNum == CustTrans.AccountNum) {
          rSum += custTransLoop.AmountCur;
        }
        else {
          break;
        }
      } while (qrHead.next());

      mrSum = rSum; //prepare value to be shown at group header.

      super(); //execute the group header.
    }

Microsoft Supplies the Brain of Formula One Cars

March 12, 2008

The FIA Formula One World Championship Season 2008 will commence this week. After months of winter development and testing, Melbourne will again host the inaugural race of the season. The Australian Grand Prix weekend will start on Friday, March 14, 2008 and the race on Sunday.

Formula One Race

I have been following F1 for more than a decade. I love the passion and spirit where some 1000 people work as a team in the most efficient manner towards one goal, to prepare and run two cars for 18 (depends on the schedule of the season) races a year. I also love the complexity of its technology and the pace of development. The whole team is going all out to extract every bit of performance they could from the package.

The Regulation

There will be further rule change in accordance to the direction of FIA president Max Mosley as usual. We will focus on Technical Regulations Article 8.2.1 concerning Control Electronics.

8.2.1 All components of the engine and gearbox, including clutch, differential and all associated actuators must be controlled by an Electronic Control Unit (ECU) which has been manufactured by an FIA designated supplier to a specification determined by the FIA.

The ECU may only be used with FIA approved software and may only be connected to the control system wiring loom, sensors and actuators in a manner specified by the FIA.

The Project

Formula One Logo

Microsoft will have its share of Formula One technology this year. In year 2006, Microsoft in partnership with McLaren Electronics Systems (MES) was awarded the tender to supply Engine Control Unit (ECU) for all teams. Microsoft is part of the FIA designated supplier mentioned in the regulation above for FIA Formula One World Championship in 2008, 2009 and 2010. It was announced in the FIA press release on July 5, 2006. After more than a year of development and following testing by all Formula One contenders for 2008 season, it is ready for race in the next few days.

So what does this ECU do? It monitors and controls just about every aspect of the engine operation. It controls the ignition timing, fuel quantity and mixture, etc. base on data gathered from over 100 sensors in the car. The same data will also be continuously transmitted in real time back to the control center of each Formula One team at the pit-side. As far as I am concerned, Scuderia Ferrari Marlboro also broadcast the data back to their factory at Maranello in real time.

According to Microsoft press release dated December 11, 2006, we will see a host of Microsoft software solution employed. Among them are Microsoft Windows Vista, Microsoft SQL Server 2005, and Microsoft Office 2007. Hope we could get more information on the actual deployment soon.

Final Thoughts

I would say this project is very much in line with Microsoft ideology. Formula One is widely agreed as the pinnacle of motorsport. It attracted the best people in the industry and the pace of technology advancement is second to none.

The sport is about a group of highly able professionals continuously digesting huge set of data making split second decisions to affect the outcome of the race to their favor. The system supplied will utilize various Microsoft technologies to support informed decision at the highest pace and precision.

Microsoft constantly declares that they want to provide people with the right technology and tools to enable them to succeed in their business. The ability to provide tools for this business is definitely a respectable achievement.

I have seen people joke about the idea of these ECUs software crashes in the middle of race, etc. since the announcement was made. I would not say it is impossible to happen that way but looking at the way Formula One teams operate I am positive only very rare glitches would be left unidentified. We could expect an exciting and safe season ahead.

SQL Server Authentication Mode

March 11, 2008

Microsoft SQL Server supports two authentication modes; Windows Authentication and Mixed Mode. Before we move on, I would like to introduce another terminology called authentication method. Authentication method is the way a user is authenticated. Authentication mode on the other hand determines the authentication methods accepted by Microsoft SQL Server.

There are two authentication methods supported by Microsoft SQL Server. They are named Windows Authentication and SQL Server Authentication. The former relies on the Microsoft Windows operating system to authenticate users. The latter will have the user authenticated by Microsoft SQL Server based on the username and password supplied by the client application. The powerful "sa" is an example of login authenticated by SQL Server Authentication.

The following figure shows the login screen of Microsoft SQL Server Management Studio. Note the drop down list with the authentication methods offered.

SQL Server Login Screen - Authentication Mode Selection

Let us get back to authentication mode. The mode Windows Authentication will accept the first method namely Windows Authentication only. As for Mixed Mode, both Windows Authentication and SQL Server Authentication are accepted. In other words, logins such as "sa" will be denied if the mode Windows Authentication is active. The following figure shows the configuration of Authentication mode. You will find it at SQL Server Properties Security page.

SQL Server Properties - Security Page

Windows Authentication is the preferred mode because it provides the highest level of security. It is the default authentication mode for Microsoft SQL Server 2005. The authentication and account policy are enforced by Microsoft Windows operating system.

Mixed Mode is typically used with legacy systems that do not use Windows user accounts. It is also used when the environment consists of clients that need access but is running on operating systems that cannot authenticate with the Microsoft Windows operating system. This happened to clients running Mac OS, UNIX, etc. These clients could login using SQL Server Authentication.

When using Mixed Mode, extra attention has to be given to the login "sa". This account is highly privileged and could pose security threat. It is advisable to create a strong password for this account in case Mixed Mode is used.

Multiple Instances of SQL Server

March 4, 2008

You may install multiple instances (or copies) of Microsoft SQL Server 2005 on the same computer. This is applicable to installing alongside different editions as well as earlier versions Microsoft SQL Server. In other words, you can have more than one set of Microsoft SQL Server installed on one machine working independent from one another.

This capability enables us to strategize the utilization of hardware resources to achieve our needs. It allows test for different customer utilizing different SQL Server edition and version on one server. It is also useful when you host database for customers that requires full administrative control of their SQL Server instance.

Default Instance and Named Instance

There are two types of installation allowed for SQL Server installation; default instance and named instance.

The default instance is an installation where you do not give a name to the instance of Microsoft SQL Server. In this case, the instance name will take the name of the server. Hence, you refer to the Microsoft SQL Server by specifying the server name. Due to the use of server name as instance name, you are only allowed to install one default instance on one machine.

A named instance is an installation where you have to specify a name for the instance of Microsoft SQL Server during installation. The instance of Microsoft SQL Server will be referred in the form of [SERVER NAME]\[INSTANCE NAME]. You may install more than one named instance provided the name of each instances are different.

When you start Microsoft SQL Server installation wizard, it detects whether the default instance already exists. If it could not find one, you will be given the option to install a default instance or a named instance. Otherwise, you will only be allowed the option of installing a named instance.

The following figure shows the screen where you choose the type of instance to be installed. It is part of the installation process.

SQL Server Instance Selection Setup Screen

Conclusion

This capability leaves rooms to creatively strategize installations of Microsoft SQL Server to our needs. However, we have to be wary of the administration overhead and the duplication of components. Each instance will take up additional hard disk space, memory utilization and processor capacity.