Notifications
Announcements
No record found.
Hi,
Can we do journal posting through X++ by using multithreading of batch classes ?
*This post is locked for comments
You may schedule a posting to execute in a batch job:
technet.microsoft.com/.../aa583389.aspx
That is a single batch task per posting, no multi-threading involved.
Multiple postings scheduled would be multiple batch jobs with a single task each, executing parallel if you have available threads set in your Server configuration for batches.
How do you imagine a multi-threaded posting for a single journal? I do not think that is feasible, since it has to be in a single TTS transaction block in order to roll the posting back in case of an error.
Posting journals in X++ is relatively straight forward.
What is the purpose of multi-threading? To post multiple journals at the same time, or to try to speed up the posting of a single journal by having multiple threads working together in parallel on that single journal (don't think it's possible)?
Hi Vilmos,
I have multiple journals to post. Which is taking about 2 -3 hours for posting.
I am trying to create thread based on each journals. It is throwing error of "System.NullReferenceException: Object reference not set to an instance of an object".
AX already has batch bundling feature such as for Sales invoice posting. There is a setting for Number of documents in batch task, and the posting for multiple invoice journals will bundle them together per task according to the value set:
community.dynamics.com/.../number-of-documents-in-batch-task-in-ax-2012
You could use Cross-reference tool on that parameter field to find out how exactly it is being used, and see if something similar is available or not for your journal posting type.
If not, you could implement it in a similar way and use the above as an example.
Also Microsoft has a series of articles on the topic:
blogs.msdn.microsoft.com/.../batch-parallelism-in-ax-part-i
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2