A quick fixup X++ code job for unbalanced TTS
During development you may encounter one of these.
![Unbalanced TTS error](http://sysdictcoder.com/blog/wp-content/uploads/unbalanced-tts-error.png)
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 Jimmy_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.