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

D365 OData: How to filter PO lines by status?

(1) ShareShare
ReportReport
Posted on by 92
Hi,
 
I was told in other thread, that D365 F&O OData does not support $filter inside $expand, so I cannot filter PO lines by status in my request for PurchaseOrderHeadersV2 endpoint.
 I would like to discuss how it can be done.
 
1. Is it true, that here are NO any ways to filter PO lines in request for PurchaseOrderHeadersV2 endpoint?
 
2. As I understand, the only way to have it done is make 2 requests:
  Req 1:   Get PO filtered headers from PurchaseOrderHeadersV2.
  Req 2:  Get filtered lines for headers above from PurchaseOrderLinesV2
 
and then combine  results of two request. 
 
Categories:
I have the same question (0)
  • Anthony Blake Profile Picture
    2,963 Super User 2025 Season 2 on at
    Hi
     
    I think you are correct, also consider reversing the order if the lines query is more selective.
     
    Anthony
  • Verified answer
    Anthony Blake Profile Picture
    2,963 Super User 2025 Season 2 on at
    Just to add, another option is a custom Data Entity to return your combined dataset.
  • Andrei Profile Picture
    92 on at
  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at
    No, composite data entities can't be used over OData. Anthony means a normal entity using both headers and lines as its data sources.
  • Andrei Profile Picture
    92 on at
    Thank you, Martin.

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

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans