Skip to main content

Notifications

Announcements

No record found.

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!

  • itsdeshpande Profile Picture
    itsdeshpande 40 on at
    RE: Create a view for cases based on a column in related account entity

    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?

  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    RE: Create a view for cases based on a column in related account entity

    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/ 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans