Donnerstag, August 30, 2007

Label for query range cannot be modified in AX 5.0

I've now checked this function and I have to say that it still doesn't work. If you change the label for a query range, AX 5.0 will give you an error message, too.

This is a follow up to a previous post:

Dienstag, August 28, 2007

Catching keystrokes or function keys

The last days I've been struggling to find a way to catch keystrokes in a form to create keyboard shortcuts for the users. Well, I didn't succeed so far but I found something concerning function keys.

In the shop floor control module, some forms use functions keys to control the form buttons (e.g. the form "JmgRegistraion"). I invested some time in it and it seems to me that the form doesn't really catch the keyboard event. The form uses a third party DLL and if you press F1, it will send the key "1" to the keyboard buffer. The buttons in the form have the numbers 1-9 as their first letter in the button text (property "Text" for the button).

So, you press F1, the DLL sends the key "1" to the buffer and AX then connects it to the button that starts with "1".

Well that's not really what I was looking for (and moreover, it will not work for F10, F11 and F12. It doesn't work for those keys in the mentioned form.)

But it's a start.

Donnerstag, August 02, 2007

Activating query tracing for all users

Sometimes when you are tracking performance (or other) problems, you may want to activate the long running query tracing for all users. Here is a little job that will do that. Beware: you have to activate trace settings on your AOS server, unless most of the queries will not be caught.

static void Set_SQLTrace_AllUsers(Args _args)
#LOCALMACRO.FLAG_TraceInfoQueryTable (1 << 11) #ENDMACRO

boolean set;
UserInfo userInfo;

set = true;
while select forupdate userinfo
userinfo.querytimeLimit = 1000;
if (set)
userInfo.DebugInfo = userInfo.DebugInfo | #FLAG_SQLTrace;
userInfo.TraceInfo = userInfo.TraceInfo | #FLAG_TraceInfoQueryTable;
userInfo.DebugInfo = userInfo.DebugInfo ^ #FLAG_SQLTrace;
userInfo.TraceInfo = userInfo.TraceInfo ^ #FLAG_TraceInfoQueryTable;