Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Relate sales lines wit...
Finance forum
Answered

Relate sales lines with purch lines

Posted on by 93
Hi everyone.
 
I have a question about relating SalesLine with PurchLine, I´m using the fields (IntercompanyOriginalSalesID, DataAreaId, and ItemId) but I find duplicated records cause the same ItemId can be in two or more rows, I need to use a unique field that relates each SalesLine record with each PurchLine record. can somebody please explain to me about the SourceLineDocument, I have this field fill on my SalesLine records but I cannot relate it with any table.
 
Thank you
  • maober56 Profile Picture
    maober56 93 on at
    Relate sales lines with purch lines
    Hi Layan,
     
    Thank you for your answer.
     
    Effectly InventTransId and InventRefTransId make part of the relation but sadly in my case it doesn't work.
  • Verified answer
    Layan Jwei Profile Picture
    Layan Jwei 6,886 Super User 2024 Season 2 on at
    Relate sales lines with purch lines
    Hi moaber,
     
    I only have one example with one line in my devBox
    And i can see that 
    PurchLine.InventTransId = SalesLine.InventRefTransId
     
    Maybe you can also add to that PurchLine.ItemRefType=Sales
    And PurchLine.SalesId = SalesLine.SalesId
     
    But InventTransId and InvenRefTransId might be enough. Check few examples in your devBox to confirm.
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    Deepak Agarwal Profile Picture
    Deepak Agarwal 148 on at
    Relate sales lines with purch lines

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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,326 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,166 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans