Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

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

(0) ShareShare
ReportReport
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
    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
    2,148 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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans