In AX7, we have various new ways to execute time consuming operations in the web client. We all know the feeling that if we want to execute a time consuming operation on an AX form, that operation blocks all the user interface until it is completed showing a white screen or waiting message. To prevent this, in AX 2012 we used either the progress bar to display the operation progress to user, or some asynchronous execution possibilities like the Thread API or xApplication::runasync() method to run the operation on the background.
In AX7 optimizing our time consuming operations is extra important because we are running them on a web based interface which will be blocked, or run into a timeout if we run such a long operation. For that reason, optimizing our execution time and leaving the user interface free for the user with asynchronous execution is important and recommended. We already see it is being used in many new forms of AX7, like the new data import form.
Now lets have a look at the different possibilities we have for running time consuming operations in AX7. To test them we create a simple form like this :
Continue reading “Synchronous and asynchronous operations in AX 7”