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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

SQL Join Between Purchase Requisition Lines and Purchase Order Lines in D365 F&O

(0) ShareShare
ReportReport
Posted on by 1
Hi Experts,

I need to link Purchase Requisition (PR) lines to Purchase Order (PO) lines using SQL in Dynamics 365 F&O.
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,734 Most Valuable Professional on at
    You may take the logic from PurchReqLine.purchLine():
    public PurchLine purchLine()
    {
        PurchLine purchLine;
    
        if (this.PurchId && this.LineRefId)
        {
            select firstonly purchLine
                where purchLine.PurchId == this.PurchId &&
                      purchLine.PurchReqLineRefId == this.LineRefId &&
                      !purchLine.IsDeleted;
        }
    
        return purchLine;
    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,093

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 193 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 159 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans