web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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 99
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)
  • Suggested answer
    Deepak Agarwal Profile Picture
    9,226 Super User 2026 Season 2 on at
  • Verified answer
    Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    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
  • maober56 Profile Picture
    99 on at
    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 265 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 261 Super User 2026 Season 2

#3
Subra Profile Picture

Subra 229 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans