HI All,
I have a requirement to create a case (incident entity) view, to show all cases belonging to an Account. However the matching criteria is not the account record id (in which case I could have used the inbuilt relationship between the two entities), but the field to match the cases to account is a field (custom field) within Account entity. I am trying to figure out a way to do it without using virtual entities. Is there a way to accomplish this? As an example, here is the scenario:
Case X is related to Account record A
Case Y is related to Account record B
------------------------------------------------------------------------------------
Case X = { CustomerId = A}
Case Y = { CustomerId = B}
Account A = { Name = Contoso Inc, Tenant Id = abcde }
Account B = { Name = Contoso Corporation, Tenant Id = abcde }
Accounts A and B although are different records, but represent the same customer. Say one has a Account Name = Contoso Inc. and the other has Account Name = Contoso Corporation. However, there is another field on the Account entity called the Tenant Id, abcde, and that value is same for both Accounts A and B. Therefore, when I show the grid for cases belonging to Contoso, when I open Account form (any of the two), it should show both cases X and Y.
Does anyone know how to accomplish this? Thank you!
This is cool, thanks Leah. Do you also know how can I parameterize that? I see Carl has a hard coded name as New York as a condition. Can I pick a value from a field of the form loaded? Can I use formContext.getAttribute("LastName").value type of arguments in fetchXML?
Hi Partner,
There is no OOB way to do this. Account and Case are related based on the CustomerId not other fields.
When you add sub-grid from case entity to account form, you can select 'Only Related Records' or 'All Records Types'
One can show related case based on customerID, another can show all cases, we can't do more customizations on the dialog.
So you need use js code to change filter of the sub-grid:
https://carldesouza.com/filtering-subgrids-in-dynamics-365-power-apps-with-setfilterxml/
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,818 Super User 2024 Season 2
Martin Dráb 229,147 Most Valuable Professional
nmaenpaa 101,156