D365 Business Central: How to Fix Missing Sales Invoices in the API
The Sales Invoices API in Business Central aggregates posted and unposted invoices from two source tables. When invoices are missing from the API results, running the API Data Upgrade process from the API Data Upgrade List page resolves the issue by synchronizing the underlying Sales Invoice Entity Aggregate table.
Read it hereOpen in Claudehttps-thatnavguy-com-blog-2025-d365-business-central-how-to-fix-missing-sales-invoices-in-the-api--9b9a0831d9.md

post That NAV Guy
"The API for Sales Invoices is based on the table called Sales Invoice Entity Aggregate."
Key points
- The Sales Invoices API is built on the Sales Invoice Entity Aggregate table, which combines unposted invoices from Sales Header with posted ones from Sales Invoice Header
- Missing invoices in the API most likely mean the aggregate table did not update properly
- Fix: on the API Data Upgrade List page, select SALES INVOICES and choose Schedule Upgrades, which creates a Job Queue Entry
- Schedule the job queue entry, ideally outside business hours; when it finishes, the missing invoices should appear in the API
Quotes
- “The API for Sales Invoices is based on the table called Sales Invoice Entity Aggregate.” (Identifies the underlying table structure that powers the Sales Invoices API)
- “If invoices are missing, the most likely cause is that the Sales Invoice Entity Aggregate table didn’t update properly.” (Pinpoints the root cause of missing invoices in API results)
- “Go to the API Data Upgrade List page in Business Central. Find the relevant record: SALES INVOICES, and click Schedule Upgrades.” (Provides the specific steps to resolve the issue)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- table 5475 “Sales Invoice Entity Aggregate”
- table 36 “Sales Header”
- table 112 “Sales Invoice Header”
- page 9994 “API Data Upgrade List”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- 🧩 Deriving dimensions in Business Central beyond Default Dimensions — possibly related: both name Table 112 “Sales Invoice Header”
- BC 29 lets a single index span base table and table extension fields — possibly related: both name Table 112 “Sales Invoice Header”
- BC Friday Tips #56 Understand Missing Fields in Copy Documents — possibly related: both name Table 112 “Sales Invoice Header”
- BC Friday Tips #74 Copy Document and Custom Field — possibly related: both name Table 112 “Sales Invoice Header”
- Dynamics 365 Business Central: “Hide Company Bank Account” setup in General Ledger Setup (Update Company Bank Account on posted documents) — possibly related: both name Table 112 “Sales Invoice Header”
- Dynamics 365 Business Central: Displaying Sales/Purchase Order No. in Item Ledger Entries (Source Order No. and Source Description) — possibly related: both name Table 112 “Sales Invoice Header”
- Dynamics 365 Business Central: How to check whether External Document No./Vendor Invoice No. are unique or duplicated – Customization — possibly related: both name Table 112 “Sales Invoice Header”
- Dynamics 365 Business Central: How to run a Report in Preview Mode without the Request Page (Hide Request Page) — possibly related: both name Table 112 “Sales Invoice Header”
- Dynamics 365 Business Central: Searches for duplicate external document numbers in sales documents and posted documents (Standard function/procedure) — possibly related: both name Table 112 “Sales Invoice Header”
- Leveraging RecordRef and FieldRef for Dynamic Coding — possibly related: both name Table 112 “Sales Invoice Header”
Context
- Features: Sales Invoices API, API Data Upgrade, Job Queue, Posted Sales Invoices, Unposted Sales Invoices
Source: That NAV Guy, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.