web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Create a view for cases based on a column in related account entity

(0) ShareShare
ReportReport
Posted on by 40

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!

I have the same question (0)
  • Verified answer
    Leah Ju Profile Picture
    Microsoft Employee on at

    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.

    pastedimage1671692322999v1.png

    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/ 

  • itsdeshpande Profile Picture
    40 on at

    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?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 35 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans