Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Show subgrid of related records (1:N)

Posted on by 70

Hi all,

I'd really appreciate any advice as currently can't see a way forward with this. I have an entity called Sites, which has a 1:N relationship with Staff Members. I also have an entity called Assets which are assigned to Staff Members. What I want is to be able to open a Site record and see all of the assets that are assigned to all of the staff members that are assigned to that particular site. I hope that makes sense! I've tried to achieve this with a Quick View Form on Staff Member but as there is no lookup field on the Site record for staff members (it's the other way around in that there is a Site lookup on Staff Member entity) I can't display the quick view form. I also tried to make a subgrid of assets on the site entity but I can't filter it specifically enough. I would love an OOB solution but as long as the method is supported I don't mind using JavaScript or a plugin - any help would be super appreciated.

Thanks
Sam

  • samnunn92 Profile Picture
    samnunn92 70 on at
    RE: Show subgrid of related records (1:N)

    Thanks both for the answers - I think after all I will have a look at trying some formscript to maybe pull the records using the Web API and if I don't have any luck will try your OOB suggestion Carl. Thanks again!

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Show subgrid of related records (1:N)

    Hi patner,

    Also, if you have already assigned Assets to Staff Members, you have to code or use plugins to view the assigned assets in the Sites form.

    You could try this plugin: hulshof.eu/.../

  • Verified answer
    Carl Gallagher Profile Picture
    Carl Gallagher 15 on at
    RE: Show subgrid of related records (1:N)

    what is the nature of the relationship between Staff Members and Asset, is it 1:N, or N:N? If it is 1:N, and you want to use a truly out of the box implementation, I would recommend the following.

    Create a new relationship 1:N relationship between site and assets. Then when an asset is assigned to a staff member (or when the staff member is changed), fire a workflow that copies the site value from the staff member down to the asset. Then you will be able to display a subgrid of assets on the site record because there is a direct relationship. Of course this only works if the Staff Member to Asset relationship is 1:N

    The other option might be to use formscript as you suggest, or you could look at an embedded Canvas App! I don't know exactly how you would do either off the top of my head, but they seem as though they should be possible.

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans