Microsoft Dynamics AX Blog
A study was done by Job Graphs (http://www.jobgraphs.com/) for Microsoft Dynamics AX as a global software product. I leave you with the graphs.
If you don’t have the Arabic help files of Dynamics AX you could download them from here:
To install the downloaded file to your environment, you have to get it copied to all the clients that needs to access the help files in an Arabic version. To get that, do the following:
- Download the files
- Unzip the folder in order to to get the “AR” folder
- Copy the unzipped folder in each client into: <<Installation folder>>Microsoft Dynamics AX50ClientBinHelp
By this you will be able to read the help files in the Arabic version.
And of course, do not forget to turn the Help language in the User Options form into AR!
Here we are
If you wanted to write a an X++ code to generate a number sequence and assign it to a field, you might use the following X ++ statement.
1 | yourTableBuffer.Field = NumberSeq::newGetNum(NumberSequenceReference::find(TypeID2ExtendedTypeId(TypeId(YourExtendedDataType)))).num(); |
And for the continuous number sequence (notice the “true” parameter):
1 | yourTableBuffer.Field = NumberSeq::newGetNum(NumberSequenceReference::find(TypeID2ExtendedTypeId(TypeId(YourExtendedDataType))), true).num(); |
But, what you could do if you have that field in form and you want to generate a number sequence while the user creates a new record is the class NumberSeqFormHandler.
NumberSeqFormHandler is a great class that doesn’t only take care of generating a new number sequence for your field… but also it takes care of removing or inserting that number in the Number Sequence List table when the number is not used (in case that the record hasn’t been inserted although the number has been already generated).
To use the NumberSeqFormHandler class, you have to declare a NumberSeqFormHandler object in the class declaration. Also you have to create a method at the Form level like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | //Form level method NumberSeqFormHandler numberSeqFormHandler() {; //you should have been declared numberSeqFormHandler variable in the ClassDeclaration of your form if (!numberSeqFormHandler) { numberSeqFormHandler = NumberSeqFormHandler::newForm(NumberSequenceReference::find(TypeID2ExtendedTypeId(TypeId(YourExtendedDataType))).NumberSequence, element, YourDataSourceName, fieldnum(YourTableName, Field)); } return numberSeqFormHandler; } |
Then you need to actually call the NumberSeqFormHandler class methods like:
1 2 3 4 5 6 7 8 9 | //Form methods public void close() { if (numberSeqFormHandler) { numberSeqFormHandler.formMethodClose(); } super(); } |
1 2 3 4 5 6 | //DataSource method public void write() { element.numberSeqFormHandler().formMethodDataSourceWrite(); super(); } |
1 2 3 4 5 6 7 8 9 10 | //DataSource method public boolean validateWrite() { boolean ret; ret = super(); ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret; return ret; } |
1 2 3 4 5 6 | //DataSource method public void linkActive() { element.numberSeqFormHandler().formMethodDataSourceLinkActive(); super(); } |
1 2 3 4 5 6 | //DataSource method public void delete() { element.numberSeqFormHandler().formMethodDataSourceDelete(); super(); } |
1 2 3 4 5 6 7 8 9 | //DataSource method public void create(boolean _append = false) { element.numberSeqFormHandler().formMethodDataSourceCreatePre(); super(_append); element.numberSeqFormHandler().formMethodDataSourceCreate(); } |
By this you will have your form works efficiently with the Number Sequence engine of Dynamics AX and you don’t have to write any code at the table level… so remove all that code that you might have written at the initValue method of your table.
One last important thing, NumberSeqFormHandler works with Continuous and non-Continuous number sequences. But if you want to “regenerate” the unused numbers that have been previously generated, you have to set your number sequence as Continuous of course.
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.
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:
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:
- Ability to see lines in code
- Improved IntelliSense features (all possibilities will appear once you type)
- Great ability to select words in editor without selecting the line from the beginning
- More colors
- Ability to check Labels value without going to the Label Editor
- .. and many more.
Check out this video You will enjoy it.
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.”
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).
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:
- download them,
- change the connection string to match yours and then
- deploy them to your environment
Have fun :).
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 :
- Backing-up my database (just in case that anything went wrong)
- Exporting the data of that table (from the AX Import/Export functionality)
- Deleting/Dropping the table from the Microsoft SQL Server Management Studio (by this all the data of course will be deleted)
- Opening the Dynamics AX client, going to: AOT –> Data Dictionary –> Tables –> LedgerJournalTrans –> Right clieck –> Synchronize
- Importing the data again to all companies (from the AX Import/Export functionality.
As you could see, I got this error in a very critical table that is the LedgerJournalTrans table. This table contained already posted lines and it was really headache for me to get it fixed. But fortunately I was able to fix it by following the previous steps.
I had a case where I tried to call a Dynamics AX 2009 AIF Web service from an XML Web Service (.asmx). But the new thing in this case is that the AIF Web Service call is actually inside a dll referenced in this new asmx web service.
When you reference that dll into a web service/asp.net project in the Visual Studio .NET, and then call the function inside that dll which calls the Dynamics AX AIF Web Service… you will have the following error:
System.InvalidOperationException: Could not find default endpoint element that references contract 'AXGLServiceRef.GeneralJournalService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName) at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName) at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory() at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait) at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef() at System.ServiceModel.ClientBase`1..ctor() at AXWCFClassLibrary.AXGLServiceRef.GeneralJournalServiceClient..ctor() at AXWCFClassLibrary.Class1.checkme() at Service.HelloWorld(String name, String accval) in d:WebSite1App_CodeService.cs:line 21 |
This error is actually due to that the end point that this dll is trying to reach is unidentified to this web application. What you have to do is:
- Go to the class library project where you created that dll
- Go to app.config
- Copy the whole ServiceModel part
- Go to the web.config in your new web application
- Paste the ServiceModel part inside the Configuration part
By this, you will be able to execute without getting that endpoint error
If you ever tried to modify the LedgerJournalTransDaily form (the Ledger Jourlan Lines form) you would notice a forest of X++ codes executed on every click, initializations, closing, fields modifications… etc. Of course this makes sense because this form is basically the backbone of financial transaction of this Dynamics AX, which in turn the backbone of all modules of Dynamics AX.
One of the common classes executed in this form is LedgerJournalFormTrans class. Basically this class controls the controls of any form where LedgerJournalTrans table is a datasource for that form. It simply controls the visibility, edibility and validity of most of the controls on that form based on the “status” of the current Ledger Journal Trans and Ledger Journal Table. Whenever a user fills data, reads data, and clicks buttons and menu buttons.. a call for a method in that class is executed to control the new write/read/event.
Actually LedgerJournalFormTrans is an important class of a series of extended classes. Those classes are like the following:
-
JournalForm --> JournalFormTrans --> LedgerJournalFormTrans --> LedgerJournalFormTrans_Payment
-
JournalForm --> JournalFormTable --> LedgerJournalFormTable
I believe from the name you could tell what all of those classes are all about.
I personally believe that implementing an ERP successfully, is nothing but a huge change in organizations. This change involves processes change, organizations structure, new challenges, eliminating old challenges, quicker response to clients, better and quicker planning.. etc. These changes are only part of the changes that this ERP software does. It’s not like any other type of software like content management or portals for example.
If you are an implementer for ERP or an end user in an organization that is experiencing an ERP implementation… you have to put this idea before, during and after the implementation. You have to have this idea in order to think how the user thinks, to encourage people around, to let them involved in this change, to support you to achieve the goals of the change in its optimal goals.
According to statistics, the main reason behind EPR failure is not the software implemented… rather it is people. 80% of ERP failure reasons are people! Nature of people in the whole world refuses changes. Even if this change is for their own good, they just refuse it… because it is a change.
A very good example of the support that all people involved in the implementation should have is what I have seen when I was visiting a company in Riyadh. This company is currently implementing SAP, they have put a screen in front of the main gate of the company showing a counter for the remaining days, hours, minutes and even seconds for the go live date. Here is a picture for it:
This kind of encouragement is very vital for people to feel the responsibility on their shoulders every time they go into the office.
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 »