Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How do I handle AX timeouts where the operation continues on? Is abort not working?

(0) ShareShare
ReportReport
Posted on by 10

I have a custom AX service operation that can take 5+ minutes to complete and I'm trying to figure out how to abort it from my .NET application, but aborting the client doesn't seem to do anything?

The problem is if I call the operation and the service times out, the AX operation continues on until completion, so I lose visibility to the results (success/failure). An example being a long-running posting operation where I don't know if it posted successfully or not.

I've created a simple demo app where I can't seem to get the operation to abort. In the below code I just create a transaction (ttsbegin/ttscommit), insert into a table at start, sleep, insert into table at end.

  • Martin Dráb Profile Picture
    234,035 Most Valuable Professional on at
    RE: How do I handle AX timeouts where the operation continues on? Is abort not working?

    I would suggest a different approach. One problem seems to be in the fact that you service client makes a synchronous call of a long-running operation and keeps waiting for many minutes. Getting into a timeout is the expected result, and it looks wasteful even without it.

    And then you want to kill a fully working posting just because of how you've designed your integration. The result would be really bad - your service would become unusable, because it wouldn't be able to do the posting.

    The solution for this problem is running the service asynchronously. It means that you start the operation and don't wait for a result. Later you'll either make a request to check the result, or you'll implement a notification from AX to your system.

    By the way, I see no "below code".

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans