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 Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,068)