Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

FetchXML - Issue with filtering related entity if empty it does not show the parent record

(0) ShareShare
ReportReport
Posted on by 879

Hello,

I have the below fetch XML that will generate the related closed-posted work orders from the bookableresourcebooking in the customer asset entity and I have a related custom entity to the WO that I am bringing from it two fields that will be generated on the report that is built on SSRS.

























The query that I have problem with is that is related to the WO is the below:



When the report got generated the only displayed records are the ones that has rows on the targeted entity "haceb_assetdetail" and the WO that is closed-posted.

What I want to achieve is to display all the work order records that are closed posted using the same query regardless of whether the work order does not have a row in this table "haceb_assetdetail".

Example:
The below screenshot shows a list of WO's:
GridSS.png

Taking the example of 38241 it does not have a line item under the haceb_assetdetail entity.
PanelReadingSS.png

As a result, when I generate the report this Work order number is not showing because of that filter logic.
RecordsDisplayed.png

What should be the updated XML query to display all the closed posted work orders with the related lines under haceb_assetdetail regardless if the work order does not have a row in that table?

Please let me know if you need any further information.

Any help is highly appreciated.

Best regards,
EBMRay

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: FetchXML - Issue with filtering related entity if empty it does not show the parent record

    Hi EBMRay,

    You should use outer link-type instead inner. Please change these lines from

    
    
    

    to 

    
    
    

    Reference:

    Inside FetchXML pt 2 - link-entity - Mark Carrington

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans