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

Tables: Sales Invoice Aggregate vs Sales Invoice

(0) ShareShare
ReportReport
Posted on by 20

We are writing a custom API to have access to D365BC line locations, which are not exposed either via API v1 or v2.

API v2 is using `SourceTable = "Sales Invoice Line Aggregate"`, but when we try to use it in our AL we get a warning:

Table 'Sales Invoice Line Aggregate' is marked for removal. Reason: Table will be marked as TableType=Temporary. Make sure you are not using this table to store records. Tag: 17.0.AL(AL0432)

Another thing is that `SourceTable = "Sales Invoice Line Aggregate"` doesn't seem to have any notion of locations.

At the same time, there seem to exist another source table (`SourceTable = "Sales Invoice Line"`), which has a record called `Location Code`, which seems to be what we need.

We were not able to find any info about the difference between these tables D365BC documentation.

What's the difference between `Sales Invoice Line Aggregate` and `Sales Invoice Line`?

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    I do not think there is documentation about one table versus the other, I only found this site:

    dynamicsdocs.com/.../sales-invoice-line-aggregate

    Thanks.

  • Suggested answer
    GoumY Profile Picture
    5 on at

    Hello Benal,

    Hope this doesn't come too late

    Working on a similar integration, let me tell you what i found so far:

    - Sales invoice Line Aggregate does not contain all the field of its related table "Sales invoice Lines", that's a gap on Microsoft end, you'll need to extend the Sales invoice Aggregate table to include the fields from "sales invoice lines" that you want.
    Quoting the 2nd article below:
    "But unfortunately, they are not available in the table “Sales Invoice Line Aggregate”. And that is a BIG miss from Microsoft. Apparently, only the fields that are used in the standard APIs have been added. The same counts for the “Sales Header” table and the corresponding buffer tables"

    - There is a code unit in Business central (see below) that does take care of synchronizing the data between Sales Invoice Lines Aggregate and Sales invoice Lines

    codeunit 5476 "Graph Mgt - Sales Inv. Lines"

    Please refer to this article that did help me a lot on this integration
    Extending standard APIs (1) – Kauffmann @ Dynamics 365 Business Central
    Extending standard APIs (2) – Kauffmann @ Dynamics 365 Business Central

    PS: if working on BC Saas, the dependency to the App of the API v2 needs to be declare in your App Manifest in order to have the symbols. see article 1
    pastedimage1627502824032v1.png

    Regards

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,055 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,014 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans