Archive
May, 2010
Browsing all articles from May, 2010
9

This topic might not be new to most of you guys, but I always wondered how can I create a primary key to a Dynamics AX table?

You could easily create index in any table in Dynamics AX and you could specify that this index is “not duplicated”, which means that values of the field(s) should be unique among the table values. But this does not mean that you this index is a Primary Key index!

To create a Primary key you have to set the PrimaryIndex property in the list of that table properties.

PrimaryIndex Property

When you choose the PrimaryIndex property you have to set that index as “not duplicated”. Once you do that, you will have the icon of that index changed to be like this:

Primary Key Index Icon

3

The New Dynamics AX 2011 X++ Editor

New features have already been added to the next version of Dynamics AX, Microsoft Dynamics AX 2011.

One of the very great features is the X++ Editor. I used to write X++ since Microsoft Axapta 3.0, there has been some slight changes between Axapta 3.0 to Dynamics AX 2009. But it looks that Microsoft is really doing the X++ editor looks somehow closely to the great editor of Microsoft Visual Studio .NET.

Some of the new features include:

  1.  Ability to see lines in code
  2. Improved IntelliSense features (all possibilities will appear once you type)
  3. Great ability to select words in editor without selecting the line from the beginning
  4. More colors
  5. Ability to check Labels value without going to the Label Editor
  6. .. and many more.

Check out this video :) You will enjoy it.

 

5

One of the few issues in Microsoft Dynamics AX 2009 that I always blaming Microsoft for not giving it in a proper way is: installing, configuring and administrating the EP (with all its related components line the SSRS, SSAS, IIS and WSS/MOSS). A great feature like this shouldn’t be left away like this Steve :)… we are dying, customers are blaiming, and partners are loosing money!

I had one issue in the last few days when I “re-installed” the EP, SSRS and SSAS then my client played with the environment and destroyed the installation. The environment was like the following:

  • SQL Server Reporting Services database is installed on another machine (Database server) than the windows service of SSRS (web server).
  • I had to use the Kerberos authentication to manage this distributed scenario

After completing the installtion of EP, SSRS and SSAS, configuring them and processing the cubes I had this error: “An error has occurred while establishing a connection to the analysis server.

Dynamics AX EP with Analaysis Services Connectivity Error

After invistigations, I discovered that the ODC file is not deployed to the EP. (ODC file is a file used to set the connnection string between the EP WSS and the Analysis Services.) You could check the ODC files by going to: Dynamics AX Enterprise Portal –> Site settings –> Site Administration –> Site Libraries and Lists –> Customize “Data connections” and then in the header area click Data Connections in the path: EP Site –> Data Connections –> Settings.

You could deploy the ODC file from within Microsoft Dynamics AX 2009 desktop client by clicking the Delpoye ODC Files button in the OLAP Administration form (Administration –> Setup –> Business analysis –> OLAP –> OLAP Administration).

OLAP Administration

But sometimes you will not be able to upload this file, and you will get an error when trying to connect to SQL and you have to check the Windows Event Log to follow that error up.

If so, then you have to maually create/upload the ODC file(s). A great post was written regarding the same issue on how you upload those ODC files specifically for Dynamics AX 2009 cubes. How to manually deploy ODC Files to Microsoft Dynamics AX 2009 Enterprise Portal.

In this post shortly the writer gives those ODC files so you could:

  1. download them,
  2. change the connection string to match yours and then
  3. deploy them to your environment

Have fun :).

5

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:

 

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 :) :

Hirji date

Dynamics AX 2012 Event

Recent Posts

Tags

Archives

Random Testimonial

  • ~ Mohamad Al-Shami, Chief of Finance and IT at WorleyParsons

    shamiii"Amer Atiyah has provided us a full time support. His involvement has crossed project management, Installation, data migration, system analysis and design for Payroll. Amer has a proven "can do" attitude and prepared to roll up his sleeves and get the job done. He has, and are continuing to, assist us with the successful delivery of our Dynamics AX ERP Implementation."

  • Read more testimonials »