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 No | Client | Product | Site |
45647 | Contoso | 2/0 x 6' Ground | Attica |
56456 | Contoso | 2/0 x 10' Ground | Attica |
56747 | Contoso | 2/0 x 15' Ground | Avon |
34556 | Contoso | 2/0 x 20' Ground | Avon |
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 No | Client | Product | Site |
45647 | Contoso | 2/0 x 6' Ground | Attica |
56456 | Contoso | 2/0 x 10' Ground | Attica |
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
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
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)
@MayankP I will take a look at this. But what stopping it to implement out of the box?
Hi @RameshMukka ,
I guess for this you might need Javascript where you can provide your own filter as shown in following article..
@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
I assume you have stocks subgrid on Delivery Header, so on your sub grid choose only related records and filter by site.
Can you offer any help guys?