web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    89,830 Super User 2025 Season 2 on at
    Sales invoice line link with order
    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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans