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

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
    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

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,126

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 744 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 674 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans