Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to determine "sales shipment header" created from "Sales Invoice Header".

Posted on by 38

I have a problem regarding partial shipments and creating invoice from order. If I create an invoice a record is also added to "sales shipment header". When I want to get the "sales shipment header" by Order No. I get both the records of the orders. In my case I just want to get the records created for that shipment at that time. Is there a way to determine which  "sales shipment header" is created for "Sales Invoice Header"? Is there a relation between the two? 

Thanks in advance.

  • yaza Profile Picture
    yaza 38 on at
    RE: How to determine "sales shipment header" created from "Sales Invoice Header".

    Hi Zhu,

    Thank you for clarifying that for me.But for example: If I have a "Sales Invoice Header" and I want to get the "Sales Shipment Header" for it in AL language, How would I be able to do so? Could you please give me an example?

    What I did was: 

    SalesShipmentHeader.SetFilter("Order No.", SORNo);
    But as I mentioned before it get's all Sales shipment headers for this soru.
    Thanks in advance.
    Gr. Youssef
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: How to determine "sales shipment header" created from "Sales Invoice Header".

    Hi, as far as I know, since there is a 1-to-many situation, they are not directly related.

    But in Item Ledger Entries and Value Entries, they are related by Item Ledger Entry No.

    pastedimage1686097358375v2.png

    pastedimage1686097374269v3.png

    pastedimage1686097384457v4.png

    Hope this can give you some hints.

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans