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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Using FetchXML Builder in XRMToolbox to exclude results

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I'm having issues with a system view and have been struggling to build my view in FetchXML Builder.

The requirement is for a system view to display a list of 'Resource Requirements' that has a 'Bookable Resource Booking' - 'Booking Status' that DOES NOT EQUAL 'Transfer', the issue is that 'Resource Requirements' can have multiple 'Bookable Resource Bookings' with different 'Booking Statuses'. 

Therefore, if a 'Resource Requirement' contains a 'Bookable Resource Booking' with Booking Statuses of 'Transferred' and another Booking Status of 'Acknowledged' then it will show up in my system view.

Is there any way I can exclude all 'Resource Requirements' in my system view if even one 'Bookable Resource Booking' contains a 'Booking Status' of 'Transfer?

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    what I am going to write here I didn't test, so it's just the first thoughts after I read your question.

    If you are able to create a view inside FetchXML Builder to filter the Resource Requirements in the way you need, I am not sure this kind of query can be saved to a view (fetchxml with grouping that is usually done in your scenario can't be saved as views)

    You will need some indicator at Resource Requirement level if there are some BRB connected with the status 'Transfer' or not. You can try first with a calculated field (maybe dealing with the BRB Name to be copied over if is 'Transfer'?) and if doesn't work then you need a plugin (I know it sounds exaggerated but I don't have other suggestions)

    After this indicator is on Resource Requirement the view become very simple to create

    hope it helps

  • Suggested answer
    Nya Profile Picture
    29,064 on at

    Hi,

    So what you need is to show all the 'Resource Requirements' that do not have a 'Bookable Resource Bookings' status of "Transferred".

    Such traversal is not supported in FetchXML, you can switch from FetchXML builder to SQL 4 CDS to perform the query.

    pastedimage1645002489478v3.png

    Please refer to the following link for the SQL.

    sql - find all parent records where all child records have a given value (but not just some child records) - Stack Overflow

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
FSRon Profile Picture

FSRon 59

#2
James White Profile Picture

James White 21

#3
AT-28040446-0 Profile Picture

AT-28040446-0 20

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans