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 :
Finance | Project Operations, Human Resources, ...
Answered

Relate sales lines with purch lines

(0) ShareShare
ReportReport
Posted on by 95
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
I have the same question (0)
  • maober56 Profile Picture
    95 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
    7,995 Super User 2025 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
    8,585 on at
    Relate sales lines with purch lines

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans