Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

Filter a View based on Sub-grid/Related Data

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. 

  • SarahC Profile Picture
    SarahC 50 on at
    RE: Filter a View based on Sub-grid/Related Data

    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

  • LuHao Profile Picture
    LuHao 40,870 on at
    RE: Filter a View based on Sub-grid/Related Data

    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

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,302 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans