Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Sales invoice line link with order

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!
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 68,757 Super User 2024 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

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans