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 :
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,060 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

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 35 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans