A quick fix for unbalanced TTS

During development you may encounter one of these.
Unbalanced TTS error

This usually leaves your Ax session in an unusable state that you can’t close properly. However, there’s no need to get out the big guns and kill the process with the Task Manager.

Instead, if possible, open the AOT and run this job:

static void resetTTS(Args _args)
{
    while (appl.ttsLevel() > 0)
        ttsAbort;
}

It simply rolls back any pending transactions until the TTS level is back at zero. Now, this doesn’t fix the cause of the problem but it makes life easier trying to iron out the bug.

One thought on “A quick fix for unbalanced TTS”

  1. calling ttsabort() once will result in a ttsLevel() == 0 !!!
    ttsabort() aborts every open transaction

    better is a ttscommit(), because you don’t know what will be exactly roll backed !

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.