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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Dynamics 365 Business Central API - Sales Invoices Missing on Rare Occasions

(5) ShareShare
ReportReport
Posted on by 21
Hey! We're working with the Dynamics 365 Business Central API and have observed that on rare occasions, some sales invoices appear to be missing when querying the endpoint.
 
What we're seeing:
  • The API responds successfully with no errors
  • However, some invoices that exist in the system are not included in the API response
  • This happens occasionally but not consistently
Note: In at least one instance, we noticed this occurred when multiple invoices were created in a short time window, though we haven't confirmed if this is always the case.
 
Questions:
  1. Are there any known issues with the Sales Invoices API not returning all records?
  2. Is there any eventual consistency or indexing delay we should be aware of?
  3. Are there any rate limiting or batching considerations that might cause some records to be temporarily unavailable via the API?
  4. Any suggestions on how to ensure we're getting a complete dataset when querying?
 
Any insights or suggestions would be greatly appreciated!
I have the same question (0)
  • Suggested answer
    Teagen Boll Profile Picture
    1,436 Super User 2026 Season 1 on at
    1. Nothing that i'm aware of but i'd recommend checking postman and testing the BC API calls in postman first. There could be filtered records or you may hit a limit in the data being queried. Sandbox environments also have extra limitations versus production environments.
     
    2 and 3. There shouldn't be any indexing delay but you can hit operational limits with OData and SOAP: Operation Limits in Dynamics 365 Business Central - Business Central | Microsoft Learn - You may have too many requests in a minute.
     
    4. If you're using the standard BC web services i'd recommend actually creating your own new web service with just the data you need. If this is posted invoices you may also have a lot of invoices so you may want to filter for a date range.
     
    Usually there aren't any issues with pulling data using OData or SOAP unless there is a high volume of records or you are constantly querying the database.
     
    If possible, it would be useful if you could provide screenshots of an example of your API call and what data its pulling.
  • Suggested answer
    Wayne R Profile Picture
    99 on at
    Hi there,
     
    This seems to be the case when the Sales Invoice Entity Aggregate table didn't update correctly, there is no error in the response, making it difficult to troubleshoot. 
     
    There is a method that goes and rebuilds the aggregate table to include those documents in the api response, perhaps this should solve it:
     
     
    Hope this helps.
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,965 Super User 2026 Season 1 on at
    Hello,
     
    There’s no known issue where the salesInvoices API randomly skips records; when this happens it’s almost always due to paging or sync logic, not the API itself. Business Central uses server-driven paging, so you must keep calling the @odata.nextLink until it’s gone — don’t use $top + $skip, as that can cause unstable results if invoices are created during your query. If you’re syncing by lastModifiedDateTime, use a small overlap window (for example, sync from “lastSync minus 1–2 minutes”) and de-duplicate by id, because invoices created close together can share similar timestamps. Also confirm you’re querying the correct company/environment and that the API user has full read permissions. Rate limiting won’t silently drop records — you’d get a 429 error. In short: follow @odata.nextLink, use stable ordering ($orderby=lastModifiedDateTime,id), apply an overlap buffer in delta syncs, and add retry logic for very recent documents.
     
    Regards,
    Oussama Sabbouh

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans