Skip to main content

Notifications

Community site session details

Community site session details

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

Insert Sales Record with API

(1) ShareShare
ReportReport
Posted on by
Hi, 
We got a question from a SAAS client about the limitations of inserts of Sales Documents through various API's. Their concern is that deadlocks will occur.

Question:
What is that maximum amount of inserts that BC can handle on one record before a deadlock will occur?
If we have Three API's that will insert randomly at anytime into Sales Header & Sales Lines with approximatly 3000 records each per day will this cause deadlocks?

The proposed solution is to give the API that will have the most inserts its own buffer tables (an exact replica of the Sales Header and Lines) and then use a job queue to systematically import the data, but I'm not convinced that it is necesarry.

Thanks 
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    443 on at
    Insert Sales Record with API
    Hii There,
    As per your requirement you can try this like below mentioned. Thank you, Yun Zhu.
     
    https:/yzhums.com/6117/
     
    Thank You.
    Kamal Khakhkhar
  • Suggested answer
    Tech-Lucky Profile Picture
    1,026 on at
    Insert Sales Record with API
    check this out might be usefull for you 

    Database locking caused by web service calls

    Don't insert child records belonging to the same parent record in parallel. This condition causes locks on both the parent table and the integration record table because parallel calls try to update the same parent record. The solution is to wait for the first call to finish or use OData $batch, which will make sure calls get run one after another.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May 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 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans