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

Sales invoice line link with order

(0) ShareShare
ReportReport
Posted on by 45
Hi,
I am trying to make a report in Power Query that contains the sales order (line) number for each sales invoice line number. I looked through the standard APIs and the legacy web services, but I can't find anything that replicate the /document line tracking/ function that is available for the invoice lines in Business Central. 
The closest I get is via the Web Services - Pag 526 - Posted Sales Invoice Lines that contains a field called /Document_No_link/, which contains the /Order_No/ after expanding. But that Order_No is actually the Order_No that is contained in Invoice Header. But that field is only filled out if you invoice from the sales order directly, not when you manually create an invoice and add lines linked to a sales order. In other words, the /Order_No/ field in the header is not really that useful.
Any pointers would really be appreciated!
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    97,970 Super User 2026 Season 1 on at
    Hi, I briefly tested it. Both methods can use the Order No. and Order Line No. fields, but they may not be displayed on the page. You need to add them to Pag 526 - Posted Sales Invoice Lines first, and then publish them to the Web Service. , you should be able to see these two fields.
    Test:
    If posting from Sales Order:
     
    If using Get Shipment Lines from Sales invoice
     
    Hope this helps.
    Thanks.
    ZHU

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!

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,155 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,043 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 955 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans