Use regular expressions in the Find dialog

The cross reference in AX is to me a very important tool to stay on top of things. I use it for research trying figure out how things are connected and I use it when I refactor code to see if I need to change any surrounding code. In our development environment we have had…

2

Display customizable help or status text in the status line

In the right side of the status line there is a small area where you set custom texts independently of the help text (which is shown to the left). Here is a small job demonstrating this:static void setStatusLineText(Args _args){    ;     xUserInfo::statusLine_CustomText(true); // Force the text to be shown    infolog.writeCustomStatlineItem(“AX Rules”);} If you don’t force…

2

Smarter dialogs

I don’t know about you, but it seems to me that dialogs for jobs in AX gets more and more complicated. I have a feeling a few of them could solve most of the world’s problems with hunger and pollution, if I could only figure out how fill the dialog fields correctly… Users need help…

4

New Channel 9 video

Watch Michael Fruergaard Pontoppidan explain the cool AX model-driven architecture from your desk in this new Channel 9 video: https://channel9.msdn.com/ShowPost.aspx?PostID=235384 Michael is a co-author of the “Inside Dynamics AX 4.0” book. Read more from Michael on his blog here.

1

Analyzing table relations of a Query object

One of my ISV Buddies asked me how he could write code to analyze the table relations between the data sources of a Query object. Here is the job I wrote for him as an example. I thought it might could be of general interest. static void QueryLinks(Args _args) {         Query query = new Query(queryStr(VendTransOpen));   …


isTypeTime

Checking if a certain data field is of the ”time” data type is not as obvious as you may think. Your first few attempts will most likely just tell you that the type of your field is Integer. Here’s a job with a small snippet of code showing you how to go about this: static…


Runtime modification of Auto Design report sections

When you use Auto Design sections in your reports you don’t have to worry a lot about the design of the report. Everything will print just nicely. But Auto Design is problematic to work with if you want to runtime change one of the reports controls in the section. It could be that you for some…

1

Get the caption of a running form

Here is a small tip on how you from code can get the caption of a running form: static void GetCaption(Args _args){    Args args = new Args(formstr(CustTable));    FormRun fr = ClassFactory::formRunClassOnClient(args);    ;    print Winapi::getWindowText(Winapi::getForegroundWindow());    print Winapi::getWindowText(Winapi::getFocus());        fr.init();    fr.run();        print Winapi::getWindowText(fr.hWnd());        fr.close();        pause;} You can use Winapi::setWindowText(…) to set the text. In…


Is there anything Excel isn’t a good tool for?

Well, it can’t brew coffee – yet. I regularly use Excel when I need to analyze AX internals like table setup or the cross reference. So I thought I’d share one of my jobs with you and hopefully you will find it inspiring. I just want to show you the principles so it is really…

6

Activating a custom toolbar

In my previous post I gave a short example of how you can use a regular form to create a new custom toolbar. That was the easy part. You would of course want to make it easy to access the toolbar and with this post I will describe a suggestion for doing that. Customized short…

1