Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How to create a sub-grid that lists all lookup fields with roles from another entity

Posted on by 5

Hi All,

so we have a requirement where the custom entity has multiple lookup fields pointing to contact and we want all lookup to the contact record to be displayed in a single sub-grid but including the roles.

from contact lookup fields on the custom entity form
pastedimage1660841994809v1.png 

custom entity records with roles would be on the contact subgrid

pastedimage1660842541837v2.png

Is this something that can be done out-of-the-box? am I missing anything?

Thanks,
Mark

  • Mark Vin Profile Picture
    Mark Vin 5 on at
    RE: How to create a sub-grid that lists all lookup fields with roles from another entity

    Hi Mike,

    Thank you for your response. I fail to understand how a single field would be able to cover different roles for possibly different users.

    Also if it is a single field for a single user role, I can use the default many-to-one relationship as sub-grid to display only that specific role. But I want to display all roles in a single sub-grid.

    But the optionset approach is really solid, I just don't understand how to implement an optionset to a single field like what you are saying.

    Would you mind providing another example or snippets of your approach or an article?

    Thank you so much!

  • Suggested answer
    MikeC282 Profile Picture
    MikeC282 2,095 on at
    RE: How to create a sub-grid that lists all lookup fields with roles from another entity

    Hi bud,

    The way you've structured the custom entity isn't correct.

    Why can't you have a single lookup on the custom entity going to contact and then have Role set as a separate field on the custom entity maybe have it as a optionset if you don't want users to type anything in? By default a lookup on the custom entity creates a many to 1 relationship between the entity and the contact record..

    That way you can just create a subgrid based on 1 lookup field. It's also more scalable as when you need to add more roles you don't have to create multiple new lookup fields on the custom entity... You can just add a role on the optionset.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans