Hi Everyone,
I have a Class and i want to run it Asynchronously, Can anyone please help me out, how to do it. Or is it possible to run code Asynchronously in Dynamics Ax other then Service. Can anyone please provide some code Example on how to do it. Thanks.
Best Regards
Shah
*This post is locked for comments
As Andre mentioned you can use batch framework to do asynchronous tasks, please refer to tutorial_RunBaseBatch class. It is standard way to do it in AX.
You can use SysOperationFramework, it has asynchronous mode of executions, here is white paper: [View:https://www.microsoft.com/en-us/download/details.aspx?id=29215:750:50]
Or you can use threads. Please find link to old community post with lots of info about threads [View:https://community.dynamics.com/ax/f/33/t/106768:750:50]
Hi Shah,
You can create a batch job for this or have a look at how the async calls are made for transfer subledger transactions to the accounting entries. A setup for syns, async or batch processing for this subledger posting can be found in the Ledger parameters. From there you might be able to find where this field is used and where it will start a thread to run the code.
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator