Hi!
The following link will allow you to download a series of white papers that are related to Microsoft Dynamics AX 2012 code upgrade, among other stuff.
http://www.microsoft.com/download/en/details.aspx?id=20864
In summary, the white papers cover the following:
Code Upgrade Overview - Discusses changes in the code upgrade for Microsoft Dynamics AX 2012.
Date Effective Patterns - Describes how to use date effective tables to store and track object history in Microsoft Dynamics AX 2012.
Implementing and Extending the Organization Model - Discusses the organization model in Microsoft Dynamics AX 2012, and provides guidelines for extending the organization model for new types of operating units that are required to support industry vertical scenarios.
Developing with Table Inheritance - Outlines the developer experience of creating and programming with the table inheritance data model in Microsoft Dynamics AX 2012.
Eventing - Describes the concept of events and how they can be used in Microsoft Dynamics AX.
Migrating Extended Data Type Relations - Describes how developers can migrate EDT relations to table relations in the Application Object Tree (AOT) in Microsoft Dynamics AX 2012.
Implementing the Global Address Book Framework - Describes the address book framework in Microsoft Dynamics AX 2012, which allows information to be shared across Microsoft Dynamics AX companies and entities through a central repository of users and organizations. It has been enhanced to facilitate easier sharing.
Implementing the Account and Financial Dimensions Framework - Highlights new patterns used to represent accounts and financial dimensions and describes how to convert the existing patterns to the new Microsoft Dynamics AX 2012 patterns.
Implementing the Budget Control Framework - Includes information about key integration patterns for new financial frameworks, how to make budget requests, and how to use the ledger budget control framework with core integration patterns.
Mapping the LedgerTrans Table to General Journal Tables - Describes how the LedgerTrans table has been mapped to multiple general journal tables.
Implementing the Item-Product Data Management Framework - Highlights the new patterns that are used to represent item-product master data. When detailing the new patterns, the document also describes the pattern that is being replaced and how developers should approach updating their code.
I have been able to go through a few of them and there is a lot of work to be done to get savvy in AX 2012.
I would suggest having a virtual machine with AX 2012 before even considering going over these white papers, believe me, I started looking at them without having an open instance of AX 2012 in front of me, and many stuff did not make any sense (i.e. Table inheritance development).
I hope you guys can share what you are discovering with the community at some point.
Take care!
Showing posts with label AOT. Show all posts
Showing posts with label AOT. Show all posts
Monday, December 19, 2011
Thursday, November 17, 2011
Naming Conventions in Microsoft Dynamics AX
Hi there!
I remember when I started developing software ... oh man, time goes fast as it was many years ago. In my first job I had a manager that would always reminded me to create clear naming conventions for my objects. He believed this was the base for any software development design as they were really important when scaling up an existing application. Yes, he was right!
Later in my life I started working in bigger teams, and one of the things that caught my attention in these environments was the fact that there were many developers that didn't care about creating consistent naming conventions when writing code.
Yes, this is horrible and makes it hard for the person who is later maintaining or scaling up the system.
There is a great quote about this:
“ Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ” - Rick Osborne
Luckily we don't have to work under the pressure that a psychopath will come to our homes at night if we don't write good naming conventions...But, what about the customer and/or employer who trusts us in doing a professional job?
To be honest with you, I think that dealing with a psychopath is much easier than dealing with an unhappy customer ... They support our lifestyle!
When I started working with Microsoft Dynamics AX, I rapidly understood the importance of getting into the habit of writing well defined naming conventions as the application objects are not only data types and classes (in the case of early languages), but tables, enums, macros, forms, data sets, queries, menu items, services, etc.
I remember when I started developing software ... oh man, time goes fast as it was many years ago. In my first job I had a manager that would always reminded me to create clear naming conventions for my objects. He believed this was the base for any software development design as they were really important when scaling up an existing application. Yes, he was right!
Later in my life I started working in bigger teams, and one of the things that caught my attention in these environments was the fact that there were many developers that didn't care about creating consistent naming conventions when writing code.
Yes, this is horrible and makes it hard for the person who is later maintaining or scaling up the system.
There is a great quote about this:
“ Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ” - Rick Osborne
Luckily we don't have to work under the pressure that a psychopath will come to our homes at night if we don't write good naming conventions...But, what about the customer and/or employer who trusts us in doing a professional job?
To be honest with you, I think that dealing with a psychopath is much easier than dealing with an unhappy customer ... They support our lifestyle!
When I started working with Microsoft Dynamics AX, I rapidly understood the importance of getting into the habit of writing well defined naming conventions as the application objects are not only data types and classes (in the case of early languages), but tables, enums, macros, forms, data sets, queries, menu items, services, etc.
In addition, naming conventions contribute to consistency and to making the application easier to understand. I think that the basic rule to create good naming conventions is to do it from three basic components:
{business area name} + {business area description} + {action performed (for classes) or type of contents (for tables)}
Examples:
• CustJournalPrintOutInvoice
• PriceDiscAdmDelete
• PriceDiscAdmSearch
• PriceDiscAdmName
• PriceDiscAdmTrans
Also, take into consideration the following:
• All names must be in U.S. English.
• The default rule is to use logical and descriptive names if no other specialized rules apply.
• Identifier names have a limit of 40 characters.
• Names must be spelled correctly.
• Names must be used consistently.
• All texts that appear in the user interface must be defined by using a label.
• Do not begin a name with nonsensical or confusing prefixes, such as "aaa" or "CopyOf".
• Do not begin a name with "DEL_" unless it is a table, extended data type or enum, and it is needed for data upgrade purposes - doing this may cause unexpected results.
As you can see, by following these simple rules, we can start making a big difference in our code. Let's get into the habit ... otherwise the psychopath will get you!
Take care!
Thursday, November 10, 2011
Debug X++ code in a Batch Server in AX 2009
Hi there!
Today I would like to discuss how to debug X++ code in a batch server. One of the common scenarios in AX development is the debugging of X++ code in the client.
For example, if you want to debug the SalesFormLetter class after posting either a Packing Slip or an Invoice, you just would go to the AOT > Classes>SalesFormLetter look for the method you want to debug and add a breakpoint. Simple!
In AX 2009, however, we have the ability to run Batch jobs directly on the server (unlike prior versions (i.e. 3.5)). The problem is that to accomplish this, we have to configure a few things.
The following are the steps to accomplish debugging X++ code in a batch server. The example is going to be using the SalesFormLetter class run method.
NOTE: Please use a Development or Test environment to try these steps.
1- Open the Client Configuration Utility and Click the Manage button. Choose Create New Configuration.
2- Give it a name. (I have chose Debug2713)
3- Set the server name, instance name and port (the default for the first instance of AX will be 2712. If you have more than one instance make sure you have the right port. In my case the AX second instance is 2713)
4- Go to the developer tab and check the both "Enable user breakpoints to debug in the business connector" and "Enable global breakpoints to debug code running in the business connector or client" check boxes.
12 - Go to AR > Common Forms and open the Sales Order Details form. Choose an Open Order and click the Post button. Choose Packing Slip (i.e.)
13 - The SalesEditForm will open. Click the Batch button and set the batch.
14- After clicking the OK button you should see the following message
If you want to check the status of your batch you can go to Basic > Inquiries >Batch Job. Your scheduled job should be in there. Wait a few minutes and the debugger should open at the breakpoint you inserted before.
NOTE: Sometimes you will have to restart the AOS service when the debugger does not open and your job has already executed. In addition, you MUST have a batch group setup.
Take Care!
Today I would like to discuss how to debug X++ code in a batch server. One of the common scenarios in AX development is the debugging of X++ code in the client.
For example, if you want to debug the SalesFormLetter class after posting either a Packing Slip or an Invoice, you just would go to the AOT > Classes>SalesFormLetter look for the method you want to debug and add a breakpoint. Simple!
In AX 2009, however, we have the ability to run Batch jobs directly on the server (unlike prior versions (i.e. 3.5)). The problem is that to accomplish this, we have to configure a few things.
The following are the steps to accomplish debugging X++ code in a batch server. The example is going to be using the SalesFormLetter class run method.
NOTE: Please use a Development or Test environment to try these steps.
1- Open the Client Configuration Utility and Click the Manage button. Choose Create New Configuration.
2- Give it a name. (I have chose Debug2713)
3- Set the server name, instance name and port (the default for the first instance of AX will be 2712. If you have more than one instance make sure you have the right port. In my case the AX second instance is 2713)
4- Go to the developer tab and check the both "Enable user breakpoints to debug in the business connector" and "Enable global breakpoints to debug code running in the business connector or client" check boxes.
5- Now open the Server Configuration File and Click the Manage button. Choose Create New Configuration. Give it a name (i.e. Debug)
6- Set the application file location and the alternate bin directory and the Application instance. In addition, check both the "Enable breakpoints to debug X++ code running on this server" and "Enable global breakpoints to debug X++ code running in batch jobs" check boxes.
7- Click the Database Connection tab and set both the server name and database name.
8- Open the AR module and go to Periodic > Clean Up > Sales update history clean up
9- Choose the Executed Clean Up option and a date and click OK.
10- Open the AOT, go to Classes and look for the SalesFormLetter class. Open the class and look for the Run method and place a breakpoint anywhere in the code.
12- Open the AX 2009 debugger
13 - The SalesEditForm will open. Click the Batch button and set the batch.
14- After clicking the OK button you should see the following message
If you want to check the status of your batch you can go to Basic > Inquiries >Batch Job. Your scheduled job should be in there. Wait a few minutes and the debugger should open at the breakpoint you inserted before.
NOTE: Sometimes you will have to restart the AOS service when the debugger does not open and your job has already executed. In addition, you MUST have a batch group setup.
Take Care!
Wednesday, July 27, 2011
strRem Function - Delete a Character from String - AX 2009
The following code searches a specified string character and deletes it. The cool thing about this function is that it is case sensitive.
For example:
str strRem(str text1, str text2)
text1 The string from which to remove characters.
text2 The characters to exclude from the output string.
strRem("MynameIs","is"); //Returns the string "MynameI".
Tuesday, June 7, 2011
RAID in AX 2009 - AX 2009
With an ERP system such as Microsoft Dynamics AX 2009, the database server generally stores a very large amount of important data for the business. If this data is unavailable for any length of time, the business could experience
significant financial losses.
Using a Redundant Array of Independent Disks (RAID) can help reduce the possibility of this loss occurring. Another important aspect for a database server is fine tuning for optimal performance. A RAID disk subsystem can also be used to help achieve this goal.
RAID refers to a group of two or more disks managed as a single unit to store the data together with additional, or redundant, information to provide recovery if there is a disk failure.
Usually a failed disk in a RAID system can be replaced while the server is still running. This is one benefit of RAID.
significant financial losses.
Using a Redundant Array of Independent Disks (RAID) can help reduce the possibility of this loss occurring. Another important aspect for a database server is fine tuning for optimal performance. A RAID disk subsystem can also be used to help achieve this goal.
RAID refers to a group of two or more disks managed as a single unit to store the data together with additional, or redundant, information to provide recovery if there is a disk failure.
Usually a failed disk in a RAID system can be replaced while the server is still running. This is one benefit of RAID.
Managing Multiple AOS Instances - AX 2009
When multiple instances are installed, use the Microsoft Dynamics AX Server Configuration utility to manage all AOS instances. Use the Server Configuration utility to verify that the AOS connects to the correct database and application file server.
1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration).
2. Click Manage, click Create configuration, and then enter a name for the configuration. Then determine whether to copy it from the active or original configuration.
3. On the Application Object Server tab, validate that the Application file location is correct.
4. In the TCP/IP port field, note which port the AOS is running on.This information is needed to connect to the AOS.
5. On the Database tab, validate that the AOS is connected to the correct database. If not, change it.
6. Click OK to exit the configuration utility
1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration).
2. Click Manage, click Create configuration, and then enter a name for the configuration. Then determine whether to copy it from the active or original configuration.
3. On the Application Object Server tab, validate that the Application file location is correct.
4. In the TCP/IP port field, note which port the AOS is running on.This information is needed to connect to the AOS.
5. On the Database tab, validate that the AOS is connected to the correct database. If not, change it.
6. Click OK to exit the configuration utility
Monday, March 28, 2011
Find AOT classes through X++
Today I needed to implement a job that existed my company's old version of AX into AX 2009. In the Old Axapta I went to Basic > Batch List to find the name of the job and/or the date it was created.
Then I went to the AOT > Data Dictionary > Tables > Batch and I opened the table by using the table browser and I saw that the Class ID for this particular Job was 40144.
Then I created a new job and I wrote the following code:
static void ClassNames(Args _args)
{
DictClass dictclass;
;
dictclass = new DictClass(40144);
info(dictclass.name());
}
The info log showed me the name of class that is run by the AX Job. From there I just created a new batch record to run it every night.
Then I went to the AOT > Data Dictionary > Tables > Batch and I opened the table by using the table browser and I saw that the Class ID for this particular Job was 40144.
Then I created a new job and I wrote the following code:
static void ClassNames(Args _args)
{
DictClass dictclass;
;
dictclass = new DictClass(40144);
info(dictclass.name());
}
The info log showed me the name of class that is run by the AX Job. From there I just created a new batch record to run it every night.
Subscribe to:
Posts (Atom)