web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Two relations for sub grid

(0) ShareShare
ReportReport
Posted on by

In Dynamics you can only select one relationship in the subgrid for one table. Is there a way to customize the subgrid with your own query?

I would like to show all related records based on two relations from one table.

Example: selected contact = ‘Peter’ has two relations to table "connections"

Result should show all records where column A =’ Peter’ or column B = ‘Peter’

 query example:

SELECT *

FROM Contact
WHERE Column A = Peter
OR Column B = Peter

I have the same question (0)
  • Suggested answer
    Scosec Profile Picture
    95 on at

    Hi,

    I think you can do this easily with the filter criteria inside the view u are using in the subgrid.

    Try using the grouped OR condition

  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    Go to the sub-grid. Get the view name which is used.

    Now update the filter criteria as per your requirement u will have to add OR condition in the view, Publish and check it after that.

  • Dy365Fan Profile Picture
    on at

    maybe I didn't express myself well. Again: I would like to show two relationships in one subgrid. See the screenshot.

    I would like Connections (Role From Contact) AND Connections (Role To Contact), related to contact where the subgrid is in.

    pastedimage1653990375288v2.png

  • Bassey Profile Picture
    9 on at

    Hi Dy365Fan 

    The field/column - Connections (Role to Contact or Role From Contact) can be added to the view you want displayed on the subgrid.

    pastedimage1654011304807v1.png

    Let me know if this helps.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 25 Most Valuable Professional

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans