web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Unbalanced X++ TTSBEGIN/TTSCOMMIT

(0) ShareShare
ReportReport
Posted on by

Dear All,

Today, I faced the below error:

1738.1.png

Though the error can be resolved by running a job as provided in the below link:

https://community.dynamics.com/ax/b/axaptavsme/archive/2013/08/29/error-an-unbalanced-x-ttsbegin-ttscommit-pair-has-been-detected-in-ax

Is there any way in AX to know which block code of had thrown this error other than debugging?

Thanks in advance!!!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at
    RE: Unbalanced X++ TTSBEGIN/TTSCOMMIT

    Hi Jaya Rajan ,

    Check all code for form or class that all of ttsBegin must be Commit or Abort .

    to resolve this error this TTS level should be ZERO, Run this job to get rid of that error, this job will find the tts level where its greater than zero and make it zero by calling TTSABORT

    static void AxResetTTS(Args _args)

    {

       while (appl.ttsLevel() > 0)

       {

           info(strfmt("Level %1 aborted",appl.ttsLevel()));

           ttsAbort;

       }

    }

  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at
    RE: Unbalanced X++ TTSBEGIN/TTSCOMMIT

    Hi Jaya Rajan ,

    Check all code for form or class that all of ttsBegin must be Commit or Abort

    to resolve this error this TTS level should be ZERO, Run this job to get rid of that error, this job will find the tts level where its greater than zero and make it zero by calling TTSABORT

    static void AxResetTTS(Args _args)

    {

       while (appl.ttsLevel() > 0)

       {

           info(strfmt("Level %1 aborted",appl.ttsLevel()));

           ttsAbort;

       }

    }

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Unbalanced X++ TTSBEGIN/TTSCOMMIT

    You would have to repeat the business functionality after freshly opening the client to see if you are able to reproduce the unbalanced TTS problem. We are sure that this is due to an incorrect customization. You could try adding infolog to the code involved in the business process which caused the above error, to tell what is the current TTS level before and after the ttsbegin/commit calls, so you could identify where could it be getting wrong.

    Obviously only do such code changes in a QA/Test environment.

    Other than this, the most reliable way to identify the issue is to debug it (once you could reliably reproduce it).

  • Suggested answer
    Sukrut Parab Profile Picture
    71,699 Moderator on at
    RE: Unbalanced X++ TTSBEGIN/TTSCOMMIT

    Its just very difficult to say  without debugging. Debug  code in your process  line by line and see which block of code is throwing this error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans