Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

FetchXML View

Posted on by Microsoft Employee

I have teams setup in my CRM, and each user is the member of one team.  All our Case's come into the Team, of which they are then Assigned to an individual.

So the Problem is I am trying to create a View, which shows all Cases assigned to the Team and the individuals.

So for example

John = IT Team

Sally = Comms Team

Billy = IT Team

Casandra = Comms team

So basically I want a view that will show all active cases, assigned to the IT & Comms Team, as well as the cases assigned to John, Sally, Billy & Casandra, I can get a view working that will show all the team jobs or all the individual jobs, but I need one that will display both, and whom the case is assigned to.

This is what I have to date:

4520.Capture.PNG

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: FetchXML View

    You sir, are a Genius :)

  • Suggested answer
    Preeti Sharma Profile Picture
    Preeti Sharma 2,678 on at
    RE: FetchXML View

    Hi,

    If you want to show cases assigned to these two teams as well as to John( may be you are reffering to logged in user) then you can apply "OR" condition with "Owner" equals "Current User"(it can be John as per need) or "Team" equals "IT" or "Comms"

    Hope this helps :)

  • Verified answer
    NatrajY Profile Picture
    NatrajY 3,040 on at
    RE: FetchXML View

    Andre might have possibly answered your question -> andz88.wordpress.com/.../fetchxml-trick-cross-entity-criteria-in-a-group-filter

  • Suggested answer
    NatrajY Profile Picture
    NatrajY 3,040 on at
    RE: FetchXML View

    Try an outer join. This is assuming that you don't need to check the team of the case owner, if the owner is an user.

    <fetch no-lock='true' >
      <entity name='incident' >
        <attribute name='title' />
        <attribute name='ownerid' />
        <filter type='or' >
          <condition entityname='owningteam' attribute='name' operator='in' >
            <value>IT Team</value>
            <value>Comms Team</value>
          </condition>
          <condition entityname='systemuser' attribute='systemuserid' operator='not-null' />
        </filter>
        <link-entity name='systemuser' from='systemuserid' to='owninguser' link-type='outer' >
          <attribute name='systemuserid' />
        </link-entity>
        <link-entity name='team' from='teamid' to='owningteam' link-type='outer' alias='owningteam' >
          <attribute name='name' />
        </link-entity>
      </entity>
    </fetch>

    EDIT: You need to do this using XrmToolBox (https://www.xrmtoolbox.com/), FetchXML Builder and View Designer as this type of view cannot be created using CRM UI.

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: FetchXML View

    Add one more step to get the assigned user means owner of the cases.pls refer below.

    community.dynamics.com/.../retrieving-all-records-owned-by-other-team-members

    Hope this helps.If the suggestion resolved your query .Pls mark it as answered/verified to close the thread.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans