Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Async method calls in AX 2012

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there any way to run methods in async in AX 2012 ?

I have found ways and implemented them in D365 F&O using Global::runAsync()

Is there any similar method in Ax 2012 such that I return a value first and then run my code in Async manner ?

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: Async method calls in AX 2012

    Hi Dhruvil,

    Impolite interjection, have you tried this blog?devblog.sertanyaman.com/.../

    It mentioned "In AX2012 for that purpose we have used the xApplication::runasync() method and Thread framework."

    Although those two are now depreciated and replaced by the optimized Form and Global class methods.

  • Martin Dráb Profile Picture
    Martin Dráb 231,387 Most Valuable Professional on at
    RE: Async method calls in AX 2012

    Aha, I thought your previus reply meant that you needed web services or so.

    If you believe that SysOperation is the same as AIF, you're wrong. This is how your code could look like:

    MyClass myClass = MyClass::construct();
    myClass.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch);
    myClass.startOperation();

    It has nothing to do with AIF.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Async method calls in AX 2012

    Not specifically, but I wanted to use thread like functionality. I wanted to return the value to the calling function first and then process my work in async manner and catch exceptions in separate log table irrespective of what value is passed the calling function.

  • Martin Dráb Profile Picture
    Martin Dráb 231,387 Most Valuable Professional on at
    RE: Async method calls in AX 2012

    Unfortunately I don't know what you're talking about. It seems you have some requirement that you didn't mention, therefore you should expain them now.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Async method calls in AX 2012

    But they have to be added to service groups and is mandatory to run it as an AIF service.

    Is there any way I don't require it to be used as an AIF service ?

  • Martin Dráb Profile Picture
    Martin Dráb 231,387 Most Valuable Professional on at
    RE: Async method calls in AX 2012

    What about using SysOperation framework with one of the asynchronous execution modes?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans