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

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
    95,311 Super User 2025 Season 2 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

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 3,316

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,449 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,431 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans