Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Combine 2 view

(1) ShareShare
ReportReport
Posted on by 874

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

  • Daivat Profile Picture
    Daivat 874 on at
    RE: Combine 2 view

    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).

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,694 on at
    RE: Combine 2 view

    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 Profile Picture
    Daivat 874 on at
    RE: Combine 2 view

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

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Combine 2 view

    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 Profile Picture
    Daivat 874 on at
    RE: Combine 2 view

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Combine 2 view

    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.  

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans