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 :
Microsoft Dynamics CRM (Archived)

Combine 2 view

(1) ShareShare
ReportReport
Posted on by 7,841 Moderator

Hello Team,

 

We have implemented the OOB Sales team concept for Opportunity entity. Now we are trying to display all open opportunity under My Opportunities that owned by current user as well as the current user have access to those through Sales Team.

 

Please suggest the way to achieve this.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    In my opinion you can use Team Access Templates if you want other team members just want to see the opportunity records.

    Read : msdn.microsoft.com/.../dn481569.aspx

    blogs.msdn.com/.../team-selling.aspx

    Administrators can change the privileges by going to Settings > Administration > Access Team Templates.  

  • Daivat Vartak (v-9davar) Profile Picture
    7,841 Moderator on at

    I am looking for option to get combine result of 'My Open Opportunities' and 'Open Opportunities where I'm part of Team'

  • Mahendar Pal Profile Picture
    45,095 on at

    Have you thought of writing plugin on retrieve multiple and then find record based on criteria and injecting result set in the respective views output property beg.

  • Daivat Vartak (v-9davar) Profile Picture
    7,841 Moderator on at

    No. I am looking for way to get FetchXML query OR view Criteria to get result from both view as well as remove duplicates.

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Daivat,

    Unfortunately there's not a way to do it out of the box. You can query for Opportunities where the user is part of the sales team, or where they're the owner, but you would need to group those conditions as an OR condition and you can't do that with entity links. 

    If you need to see the data for those two conditions bundled together, I think you'd need to write a report so you can have more flexibility over what you're getting back. FYI, here's the Fetch to get back Opportunities where the current user is on the Sales Team:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
    <entity name="opportunity">
    <attribute name="name" />
    <attribute name="customerid" />
    <attribute name="estimatedvalue" />
    <attribute name="statuscode" />
    <attribute name="opportunityid" />
    <order attribute="name" descending="false" />
    <link-entity name="connection" from="record1id" to="opportunityid" alias="ak">
    <link-entity name="systemuser" from="systemuserid" to="record2id" alias="al">
    <filter type="and">
    <condition attribute="systemuserid" operator="eq-userid" />
    </filter>
    </link-entity>
    <link-entity name="connectionrole" from="connectionroleid" to="record2roleid" alias="am">
    <filter type="and">
    <condition attribute="category" operator="eq" value="1001" />
    </filter>
    </link-entity>
    </link-entity>
    </entity>
    </fetch>

    Hope this helps! If so, it would be much appreciated if you could mark this as the verified answer.

    Thanks,

      Aiden

  • Daivat Vartak (v-9davar) Profile Picture
    7,841 Moderator on at

    Thanks Aiden.

    So, I have to get result from both view ('My Open Opportunities' and 'Open Opportunities where I'm part of Team') and then display in single report (FetchXML).

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans