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

Notifications

Announcements

No record found.

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
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
    237,795 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 152 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans