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

bulk salesorder to inserted in background while UI(Business central) not stucked

(1) ShareShare
ReportReport
Posted on by 4
i have a scenrio that i have a functionality in which user can select multiple sales order they might be of  thousands in quantity and the there is a report which acts as a job it inserts that orders i have all the functionality i have the requirnment that all of that sales orders when it inserted the UI(Business central) could not be hanged or stucked the insert functionality works on background and modify at the background. Any luck how can i achieve this kind of any async or and background thread so i can achieve it TIA.

here is a piece of code, 
                    CurrPage.SetSelectionFilter(SalesHeader);
                    SalesHeader.SetFilter(/No./, SelectionFilterManagement.GetSelectionFilterForSalesHeader(SalesHeader));
                    SalesHeaderRec.SetFilter(/No./, SalesHeader./No./);
                    if SalesHeaderRec.FindSet() then
                        repeat
                            SalesHeaderRec.BillType := BillType.FromInteger(Selected);
                            SalesHeaderRec.Modify();
                        until SalesHeaderRec.Next() = 0;
                    Commit();
 
need that this line is to be run in background SalesHeaderRec.Modify();
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
  • Community member Profile Picture
    4 on at
    YUN ZHU  i tried but this not works as page background tasks are for read only purpose i have tried the start session but can able to sort out as i have to run this function    GG_ShipGuruMethods.CreateSalesLineAndPurchaseInvoice(_salesId, 24, Selected);
    in that to be run in background.
     

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 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans