Skip to main content

Posts

Showing posts from July, 2014

How to debug xslt transformation using visual studio [AX 2012]

Dynamics AX 2012 has introduced the ability to transform an xml message using xslt. Refer to the technet article for more information on transformation of inbound ports http://technet.microsoft.com/en-us/library/hh352243.aspx Also see this nice blog post on importing bank reconciliation files using standard BAI formats  http://blogs.msdn.com/b/axsupport/archive/2014/05/20/advanced-bank-reconciliation-setup-in-ax-2012-r2.aspx Back to the topic - In this post I will show you how to debug and run the transformation in visual studio 2010. First thing you do is open up the xslt file with Visual Studio. You will see the xml editor tools on the toolbar. If you dont see it, then just right click the toolbar and add it by selecting the “XML Editor”. Now you can place a breakpoint in the document and click the start xslt debugging button (Alt +F5). First time you run it you will get to choose the input file. If you have run it before this will be defaulted. You can change it by going t

Debugging when debugger isn’t installed

This is an old trick I have been using for a while and thought it might be useful for others. Usually on production servers I avoid installing the debugger . So I get asked every now and then - “what if I need to debug something?”. I answer with – why don’t you debug in the TEST environment but in those unique circumstances you have to do it in PROD. Then, just open up file explorer and navigate to another server or where the installation files are sitting. Just run the AxDebug.exe. Debugger should stop at a breakpoint.

Manipulate the controls on a list page [AX 2012]

With list pages in AX 2012 where there is no code on the form. The right way is to have the code in the ListPageInteraction class. With the ListPageInteraction class – manipulating controls is a little hard because there is no obvious formRun or controls to manipulated. You can do basic enabling/disabling but not full control. Below I will show how you can get the formRun. Below screenshot is what I had developed recently - where I added attributes dynamically to a list page. So, that it can be sorted and filtered on. I won’t give out the full code just yet. I might do it at a later time. :-) But I will give code snippets on how I manipulated the list page. I created a Display menu item that calls a class to launch the list page. Then in that method I called my newly created formInitialize method. A typical way to launch a list page through a class is like this. Code: formRun = SysListPageHelper::runFormWithModeledQuery(formName, querystr(MyListPage), "My new list page&