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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Advice on multi-threading and batch processing for large volumes of purchase orders.

(0) ShareShare
ReportReport
Posted on by 2,304 Moderator

Hello everyone,

I'm currently starting a process where I need to create and invoice millions of purchase orders at once in Business Central. In the past, we've used multithreading in AX-2012 and D365FO to achieve this functionality, but I'm looking for best practices to implement multithreading in Business Central.

However, I'm not sure what multi-threading capabilities are available in Business Central, and I want to make sure any changes I make align with the underlying process of Business Central.

Here are my questions for the community

  • What multi-threading options are available in Business Central, and how can they be used to optimize this process?
  • Are there any guidelines for batch processing large volumes of purchase orders in Business Central?

Any advice or help you can provide would be greatly appreciated. Thank you in advance for your help!

Regards

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    There is no multi threading capabilities built into the AL language.

    So the way to achieve that is by scaling out if you run Business Central on-prem. This means that you have to use several servers to add processing capacity. And you need to balance what sessions are connected to each of the middle tier servers,.

    If you are running BC Online then Microsoft is handling all the scaling and load balancing for you.

    But you should be aware that having many processes inserting / modifying data in the same table in BC at the same time easily might get you into locking issues.

    To mitigate that you can use the isolation level:

    learn.microsoft.com/.../devenv-read-isolation

    Handling millions of purchase orders in one batch in Business Central will not work very well in my experience.

    So you will have to split them into smaller batches and build some kind of queued processing.

    Also you should be aware that if you have users manually entering purchase orders at the same time as you import they might cause locking for each other.

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, Inge is right. In BC, if there is a large amount of data to be processed, the Job Queue feature is generally used to process it during non-working hours.

    Job queue:

    https://learn.microsoft.com/en-us/dynamics365/business-central/admin-job-queues-schedule-tasks

    Or you can try Page Background Tasks, but this may also block user operations.

    https://businesscentralgeek.com/how-to-run-background-processes-in-business-central-page-background-tasks

    https://www.youtube.com/watch?v=st8KoSQoCOY

    Hope this helps as well.

    Thanks.

    ZHU

  • Govinda Kumar Profile Picture
    2,304 Moderator on at

    Hi Inge M. Bruvik and YUN ZHU,

    Thank you for responding I have a few more details to provide.

    Firstly, I am looking for a solution that can work for both on-premise and on-cloud, also, the purchase order data is already fetched from existing records through the same process, so it does not require any manual input.

    The main objective is to create and post purchase orders as quickly as possible. It is fine if the process runs in the background and the reason for us to use multi-threading is to optimize the process and complete it as fast as possible.

    I appreciate any furyther help or advice you can offer.

    Best regards

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans