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,211 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

  • Govinda Kumar Profile Picture
    2,211 Moderator on at
    RE: Advice on multi-threading and batch processing for large volumes of purchase orders.

    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

  • Suggested answer
    YUN ZHU Profile Picture
    85,450 Super User 2025 Season 1 on at
    RE: Advice on multi-threading and batch processing for large volumes of purchase orders.

    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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: Advice on multi-threading and batch processing for large volumes of purchase orders.

    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.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June 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 > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans