cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RameshMukka
Post Prodigy
Post Prodigy

How to show lookup column related records in quick view control

I have 3 tables - Stocks, Sites and Delivery Header. Delivery Header table and Stocks table got lookup column to Sites table. Now on Delivery Header mainform, I would like to show Sites Column's related records from Stocks Table in subgrid or quick view control.

For example below is the table data I have in Sites Table

 

Site Name
Attica
Avon

 

Stocks Table below

Serial NoClientProductSite
45647Contoso2/0 x 6' GroundAttica
56456Contoso2/0 x 10' GroundAttica
56747Contoso2/0 x 15' GroundAvon
34556Contoso2/0 x 20' GroundAvon

 

In Delivery Header main form, I would like to show below subgrid (of stocks table) when I have "Attica" as Site in main form

Serial NoClientProductSite
45647Contoso2/0 x 6' GroundAttica
56456Contoso2/0 x 10' GroundAttica

 

I am very much to new to model driven apps. Hope I have put my problem statement clear. Kindly help in this regard. Thank you much in advance

 

Best Regards,

Ramesh Mukka

7 REPLIES 7
RameshMukka
Post Prodigy
Post Prodigy

@ChrisPiasecki  @rampprakash 

Can you offer any help guys?

Mira_Ghaly
Dual Super User
Dual Super User

@RameshMukka

 

I assume you have stocks subgrid on Delivery Header, so on your sub grid choose only related records and filter by site.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly Thanks for responding. On the Main Form of Delivery Header when I add subgrid and check show related records, I somehow don't see stocks table showing up. I have Site lookup column in both the tables. Anything I should do before adding the subgrid for stocks table? 

 

Thanks,

Ramesh

MayankP
Responsive Resident
Responsive Resident

Hi @RameshMukka ,

 

I guess for this you might need Javascript where you can provide your own filter as shown in following article..

 

https://www.crmcrate.com/javascript/dynamics-365-crm-filter-the-sub-grid-dynamically-with-javascript...

 

@MayankP I will take a look at this. But what stopping it to implement out of the box?

MayankP
Responsive Resident
Responsive Resident

Hi @RameshMukka 

 

I can only guess since it is not direct relationship, it is difficult for system out of box to provide configuration for this kind of scenario..

so in your case
1. Delivery Header links to Site (N : 1 relationship)
2. Stocks links to Site (N :1 relationship)

but there is no direct relationship between Delivery Header to Stocks hence system can not allow this..

so to achieved this requirement we need create dynamic FetchXml and apply this to our grid (so need some JavaScript code for this as explained in previous post)

 

365CornerDawid
Resolver III
Resolver III

Hi @RameshMukka 

I understand this case in the following way: no direct lookup between stocks and delivery headers resulting in the lack of related information in the subgrid.

But you can try to add site as the grid and in the site add the subgrid of delivery headers, found following article: Nested Grids in Dynamics 365 – Dynamics 365 Talk (d365goddess.com)

 

Hope this will help ^^ if yes, please remember to select the correct answer for other community members 🙂
Regards
Dawid

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,640)