Friday, January 29, 2016

pickTable method being painfully slow in AX 2012?

The call to pickTable in a user session can be extremely slow. I have measured times of up to 20 (!) minutes on an otherwise well functioning system.

A trace shows very clearly that the method is very chatty, so wrap the call into a server bound method. And ta-da, what took minutes now takes a second or two.

1 comment:

Robert said...

You can also set some of the arguments of the picktable function, like this: tableId = pickTable(true, true, false, true);

The really long waiting times only occur after a restart of the AOS.
All information is cached so the second time you use this function is much faster.

I use this function somethimes as an indication for the perfomance of the client-server communication. You have to measure the time only the first time after starting the ax client.