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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Filter a View based on Sub-grid/Related Data

(0) ShareShare
ReportReport
Posted on by 50

Hello, 

I feel the answer is right in front of me, but I can't seem to connect the dots. 

I have an accounts sub-grid on my opportunity form to associate multiple secondary accounts to an opportunity. 

I am trying to create an opportunity view filter to only show the secondary accounts, but I can't seem to filter to show the secondary accounts. 

Part two of my issue, and why I need the view... On my account form, I have a tab to display related opportunities. I am wanting to use the associated opportunities filtered view to display the opportunity list on the account record where that account is listed as a secondary account. 

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi SarahC,

    In this scenario, an Opportunity can be associated with multiple Accounts, and an Account can also be associated with multiple Opportunities.

    So, the relationship between Account and Opportunity is N:N.

    In this case, we only need to add a sub-grid for both Account form and Opportunity form.

    Step 1. new a N:N relationship for Account and Opportunity.

    pastedimage1596781715965v1.png

    Step 2. Insert a sub-grid of this N:N relationship on the Account form and Opportunity form.

    pastedimage1596781820000v2.png

    pastedimage1596781873146v3.png

    Test:

    In the Opportunity "opp1", there are two related Account "acc1" and "acc2".

    pastedimage1596781976963v4.png

    In the Opportunity "opp2", there are two related Account "acc2" and "acc3".

    pastedimage1596781995104v5.png

    In the Account "acc1", there is a related Opportunity "opp1".

    pastedimage1596782625709v6.png

    In the Account "acc2", there is two related Opportunity "opp1" and "opp2".

    pastedimage1596782680239v7.png

    In the Account "acc3", there is a related Opportunity "opp2".

    pastedimage1596782710524v8.png

  • SarahC Profile Picture
    50 on at

    Thank you for the response. This is as easy as I thought it would be/should be. Your above are the actions I took initially, but the subgrid view on the account is returning all opportunities the account is listed. Whether it's the primary account or a secondary account.

    To give more context, we require an account on the opportunity form. Then secondary accounts are optional if needed.

    When I do the above it's returning all results the account is primary and secondary, not just the secondary.

    I found in testing the associated opportunities view filtering down very specifically I can get what I'm after: where the primary account does not contain the account and the related does contain, but then it needs to be dynamic based on the account record I am on. So this may not be the right avenue.

    pastedimage1596822914504v1.png

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans