In AX the principle of upcasting is used quite a lot. Some examples coule be the RunBase hierarchy or the InventMovement class hierarchy. Basically, the base (or super) classes contain the main part of the hierarchy logic, while subclasses only override a couple of methods performing actions specific to this class.
When browsing the AOT, trying to find a specific line of code (debugging without the debugger, basically), you often find yourself in a situation when you lookup a definition of a method from a derived class, and end up in this method of the base class instead (because upcasting was used in the code in question). And every time you need to see the same implementation in the child class, you need to go back to the AOT and open it from there manually.
Well, not any more.
Here is a small editor script, that you can use to navigate to an overridden method of a derived class.
I created 2 versions of the same script, one using xReferences, the second using Dictionary class. The xRef one, generally, works faster once the xRefs for the class hierarchy is updated (happens the first time you use the script). So I am not posting the second script version. If anyone is interested in that version specifically, let me know and I will send you the code.
I made a couple of small changes to the script since my previous post (which I deleted), making it possible to import the script without compilation errors into AX prior to verion 2009. Sorry for that :)
You can copy-paste the code for the script from axaptapedia.com (There is a problem with copying over the code from blogger site directly)
You can read more about Editor Scripts and how to use them here
Enjoy, and get back to me with any comments or suggestions, posting them as comments or e-mailing me directly
Tools and tutorials for Microsoft Sustainability Manager, Microsoft Cloud for Sustainability, Microsoft Emission Impact Dashboard, as well as Microsoft Dynamics AX aka Microsoft Dynamics Supply Chain Management (F&O)
Code highlighting
Tuesday, August 12, 2008
Thursday, July 10, 2008
Microsoft Dynamics AX 2009 Keyboard shortcuts
A whole lot of new and handy shortcuts have been introduced in Microsoft Dynamics AX 2009. To name just a few, that are very important for developers:
Ctrl+Shift+P opens the Projects
Ctrl+Shift+I (from AOT or projects) opens the import project window, etc.
Alt+F1 will return you to the main Dynamics AX window (especially useful for those fond of Tabax)
A fellow tester from Dynamics AX Client team, David Kidder, created a document containing the shortcuts available, grouping them according to where they are used in the application.
One thing I would like to highlight is that you don't need to work for Microsoft to create this list. You can get the list of all available shortcuts in the system by launching the client (Ax32.exe) with the -internal=GENERATEKEYHELP command line argument. The xml file with the shortcuts, AxKeyDump.xml, will be placed into the Client\Bin folder of Dynamics AX.
It is an extremely useful document, and I suggest everyone prints it out and hangs it by their desk.
The download link can be found below:
AX 2009 Keyboard Shortcuts.docx
Warning: The file is in Microsoft Word 2007 format, but I am sure all of you have that (or the converter) by now.
UPD: Also check out the cool looking poster with shortcut keys for end users to hang by their desk.
Ctrl+Shift+P opens the Projects
Ctrl+Shift+I (from AOT or projects) opens the import project window, etc.
Alt+F1 will return you to the main Dynamics AX window (especially useful for those fond of Tabax)
A fellow tester from Dynamics AX Client team, David Kidder, created a document containing the shortcuts available, grouping them according to where they are used in the application.
One thing I would like to highlight is that you don't need to work for Microsoft to create this list. You can get the list of all available shortcuts in the system by launching the client (Ax32.exe) with the -internal=GENERATEKEYHELP command line argument. The xml file with the shortcuts, AxKeyDump.xml, will be placed into the Client\Bin folder of Dynamics AX.
It is an extremely useful document, and I suggest everyone prints it out and hangs it by their desk.
The download link can be found below:
AX 2009 Keyboard Shortcuts.docx
Warning: The file is in Microsoft Word 2007 format, but I am sure all of you have that (or the converter) by now.
UPD: Also check out the cool looking poster with shortcut keys for end users to hang by their desk.
Tuesday, July 08, 2008
AX 2009 RTM Demo Data released
Finally, the new demo data for AX 2009 has been released. Partners and Customers can download it now from the links below:
Partner Source - download (Requires partnerSource login)
Customer Source - download (Requires CustomerSource login)
You will find two different data sets:
• Contoso Base: Contoso base demo data, with almost no transactional data
• Contoso Trans: Contoso transactional demo data, with 2 years of transactional data from Jul 1, 2006 to Jul 1, 2008 for some modules.
Demo Company Overview
The Demo Data set for Microsoft Dynamics® AX 2009 is no longer based on the Global Trade and Manufacturing Company. Based on market feedback we have created a new Contoso Entertainment systems group of companies. It comes with 2 fiscal years of transactional data that enable us to demo our stronger Business Intelligence story and Role Center pages, while allowing us to easily expand the demo data story in future releases as we expand Microsoft Dynamics® AX’s functionality footprint.
Contoso Entertainment Systems (CES) is a home electronics manufacturing, distribution and retail company that includes a Professional Services department. Its headquarters are in the USA with a key distribution subsidiary based in Germany and it works with the relevant currencies. CES distributes televisions, projectors, Digital Video Recorders and Players, and audio receivers. It manufactures speakers and assembles home theatre systems. CES’s customers are primarily based in North America and Europe and include Major Accounts (such as hotel chains), Wholesalers (of differing sizes), Retail stores (that are self-owned and operated), as well an internet storefront.
The legal and physical structure of CES is setup as follows:
• CEC – Contoso Entertainment Consolidation, based in USA
• CEU – Contoso Entertainment USA, Headquarters based in USA
o Site 1: Production of all speakers
o Site 2: Assembly of home theatre systems and Services
o Site 3: Production of Standard speakers
• CEE – Contoso Entertainment Europe, Distribution subsidiary company based in Germany
o Site 4: Distribution, Assembly and Service of all products
• CVC – Virtual company that includes table collections from CEU and CEE.
The downloads for Contoso Entertainment Systems demo data offers transactional data for Basic, Administration, General Ledger, Bank, Fixed Assets, Accounts Payable, Accounts and Receivable, Inventory Management, Intercompany, Production, Master Planning, CRM, Project, Expense Management, and Human Resources modules, and is intended to demonstrate these modules’ functionality. It also offers base data (i.e. no transactions) for the Product Builder modules. There is no demo data available for Payroll and Cost Accounting modules.
A lot of work has been put into these demo data files, to allow the users to investigate most of the functionality of the applicaton.
Thanks for this.
P.S. Just received some more input on the dataset, so decided to edit the message and post this interesting info as well
Partner Source - download (Requires partnerSource login)
Customer Source - download (Requires CustomerSource login)
You will find two different data sets:
• Contoso Base: Contoso base demo data, with almost no transactional data
• Contoso Trans: Contoso transactional demo data, with 2 years of transactional data from Jul 1, 2006 to Jul 1, 2008 for some modules.
Demo Company Overview
The Demo Data set for Microsoft Dynamics® AX 2009 is no longer based on the Global Trade and Manufacturing Company. Based on market feedback we have created a new Contoso Entertainment systems group of companies. It comes with 2 fiscal years of transactional data that enable us to demo our stronger Business Intelligence story and Role Center pages, while allowing us to easily expand the demo data story in future releases as we expand Microsoft Dynamics® AX’s functionality footprint.
Contoso Entertainment Systems (CES) is a home electronics manufacturing, distribution and retail company that includes a Professional Services department. Its headquarters are in the USA with a key distribution subsidiary based in Germany and it works with the relevant currencies. CES distributes televisions, projectors, Digital Video Recorders and Players, and audio receivers. It manufactures speakers and assembles home theatre systems. CES’s customers are primarily based in North America and Europe and include Major Accounts (such as hotel chains), Wholesalers (of differing sizes), Retail stores (that are self-owned and operated), as well an internet storefront.
The legal and physical structure of CES is setup as follows:
• CEC – Contoso Entertainment Consolidation, based in USA
• CEU – Contoso Entertainment USA, Headquarters based in USA
o Site 1: Production of all speakers
o Site 2: Assembly of home theatre systems and Services
o Site 3: Production of Standard speakers
• CEE – Contoso Entertainment Europe, Distribution subsidiary company based in Germany
o Site 4: Distribution, Assembly and Service of all products
• CVC – Virtual company that includes table collections from CEU and CEE.
The downloads for Contoso Entertainment Systems demo data offers transactional data for Basic, Administration, General Ledger, Bank, Fixed Assets, Accounts Payable, Accounts and Receivable, Inventory Management, Intercompany, Production, Master Planning, CRM, Project, Expense Management, and Human Resources modules, and is intended to demonstrate these modules’ functionality. It also offers base data (i.e. no transactions) for the Product Builder modules. There is no demo data available for Payroll and Cost Accounting modules.
A lot of work has been put into these demo data files, to allow the users to investigate most of the functionality of the applicaton.
Thanks for this.
P.S. Just received some more input on the dataset, so decided to edit the message and post this interesting info as well
Thursday, May 29, 2008
EditorScripts.addIns_OpenInAOT - version 2
A long time ago, I posted an editor script for opening objects selected in the editor in AOT (link to that post)
Yesterday, miklenew from AxForum posted an editor script for AX 3.0 that opens a new AOT window with the object currently selected in the Editor, that works a little differently and also allows to open objects based on variable type. You can view the original post here.
Today I modified this code, extending it a bit and adding support for Dynamics AX 4.0 and Dynamics AX 2009 (For version 3.0 use the code posted on AxForum).
As you can see, the code is very simple and utilizes the xReferences.
But the great thing about it is that updating the cross references is not required for this code to work, as it updates them on the fly for this specific AOT node.
I think this is a must have method for each application developer out there. :)
Yesterday, miklenew from AxForum posted an editor script for AX 3.0 that opens a new AOT window with the object currently selected in the Editor, that works a little differently and also allows to open objects based on variable type. You can view the original post here.
Today I modified this code, extending it a bit and adding support for Dynamics AX 4.0 and Dynamics AX 2009 (For version 3.0 use the code posted on AxForum).
public void addIns_OpenInAOT(Editor e)
{
#AOT
TreeNode treeNode = TreeNode::findNode(e.path());
xRefTmpReferences xRefTmpReferences;
Column nCol = e.columnNo() + 1;
Line nLine = e.currentLineNo() + 1;
;
treeNode.AOTmakeXref(1);
xRefTmpReferences = xRefCreate::makeTmp(infolog.lastxRef());
select firstonly xRefTmpReferences
order by Column desc
where xRefTmpReferences.line == nLine &&
xRefTmpReferences.Column <= nCol;
if (!xRefTmpReferences)
return;
treeNode = TreeNode::findNode(xRefTmpReferences.path());
if (treeNode)
treeNode.AOTnewWindow();
}
As you can see, the code is very simple and utilizes the xReferences.
But the great thing about it is that updating the cross references is not required for this code to work, as it updates them on the fly for this specific AOT node.
I think this is a must have method for each application developer out there. :)
Tuesday, May 13, 2008
AxPaint / AxAssist for Axapta 3.0, AX 4.0 and AX 2009
First of all, I would like to remind anyone interested of what AxPaint is. This is a small activeX component + a small xpo, that will allow you to change the background image of your application to whatever image you like.
You can find installation instructions, screenshot and a more detailed description through the link below:
http://kashperuk.blogspot.com/2007/06/axpaint-make-your-dax-look-cool.html
Well, the tool has recently been updated with support for all versions of AX starting with version 3.0.
The download link for the new (and, most probably, final) version of this tool is AxPaint.
Enjoy! :)
Also, it is hard not to mention another development tool from the same author, AxAssist. Sadly, it is not free, but it is still worthwhile to check it out - maybe that's something you company would be interested in buying. There is a Trial version you will be able to play around with for 30 days. The homepage for the tool is - www.axassist.com
You can find installation instructions, screenshot and a more detailed description through the link below:
http://kashperuk.blogspot.com/2007/06/axpaint-make-your-dax-look-cool.html
Well, the tool has recently been updated with support for all versions of AX starting with version 3.0.
The download link for the new (and, most probably, final) version of this tool is AxPaint.
Enjoy! :)
Also, it is hard not to mention another development tool from the same author, AxAssist. Sadly, it is not free, but it is still worthwhile to check it out - maybe that's something you company would be interested in buying. There is a Trial version you will be able to play around with for 30 days. The homepage for the tool is - www.axassist.com
Subscribe to:
Posts (Atom)