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

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)
  • Andrei Profile Picture
    92 on at
    D365 OData: How to filter PO lines by status?
    Thank you, Martin.
  • Martin Dráb Profile Picture
    236,160 Most Valuable Professional on at
    D365 OData: How to filter PO lines by status?
    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
    D365 OData: How to filter PO lines by status?
  • Verified answer
    Anthony Blake Profile Picture
    2,683 Super User 2025 Season 2 on at
    D365 OData: How to filter PO lines by status?
    Just to add, another option is a custom Data Entity to return your combined dataset.
  • Anthony Blake Profile Picture
    2,683 Super User 2025 Season 2 on at
    D365 OData: How to filter PO lines by status?
    Hi
     
    I think you are correct, also consider reversing the order if the lines query is more selective.
     
    Anthony

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,333

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 681 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans