Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Relation between 2 Tables

(0) ShareShare
ReportReport
Posted on by 3,027

Hi

  How the relationship can be maintained between Item Ledger Entry & Posted Warehouse Receipt Line.

Is this ok.

IlEntry.SETRANGE(IlEntry."Document No.","Posted Source No.");
IlEntry.SETRANGE(IlEntry."Item No.","Posted Whse. Receipt Line"."Item No.");
IlEntry.SETRANGE(IlEntry."Document Line No.","Posted Whse. Receipt Line"."Source Line No.");


In Posted Warehouse receipt line can 1 item occurs more than 1 time in a Document  or there can be on;y 1 entry of a particular item

Thanks

*This post is locked for comments

  • Suggested answer
    Ashwini Tripathi Profile Picture
    Ashwini Tripathi 4,624 on at
    RE: Relation between 2 Tables

    Yes you can have multiple lines for same item as you can in Sales Line. Item No. is not part your Primary Key.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Relation between 2 Tables

    if there are multiple lines for the same item in the Source Document, even the Warehouse Receipt will have multiple lines for the same item.

    you can try the below code:-

    IlEntry.SETRANGE("Document No.","Source No.");

    IlEntry.SETRANGE("Document Line No.","Source Line No.");

    IF "Source Type" = 5741 THEN  ( you need to change this based on the "Source Type")

    IlEntry.SETRANGE("Document Type",IlEntry."Document Type"::"Transfer Receipt");

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Relation between 2 Tables

    In Posted Warehouse receipt line 1 item can occurs multiple times as table's primary key No and Line No  and same way it will post to ILE.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans