Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Display/Show Contacts from Sub-Accounts(Child Accounts) in Parent Account

Posted on by 260

Hi all,

I have a scenario wherein i am using OOTB Contact Entity and two separate Custom Entities similar to Accounts. For e.g. The Custom entities are "Parent Account" & "Child Account". Now, Parent Account can have set of Contacts and Child Account can also have the set of Contacts linked in the Contacts Sub-Grid. How can i display/show the Contacts from Child Account which belong to a Parent Account within the Parent Account Contacts View. Attaching a simple figure to show the requirement. Please let me know whether this can be achieved simply by Views or JS but with Custom Entities. As mentioned, Child Account has a lookup to map it to a Parent Account.

pastedimage1597763899191v1.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Display/Show Contacts from Sub-Accounts(Child Accounts) in Parent Account

    Hi Dhawal,

    As you mean, Account Funder Group is a Parent Account and Account External Entity is the Child Account, when you select one child account on contact form, the value of the parent account is already determined by the parent-child relationship.

    So you can only create a workflow to fill parent lookup field automatically when child lookup field change. If child account doesn’t have parent account, update action of workflow winn not be trigger. Otherwise, parent lookup field will be filled with parent account value of child account.

    Finally, contacts related to child and account will be shown one subgrid.

    Regards,

    Leah Ju

  • dhawal Profile Picture
    dhawal 260 on at
    RE: Display/Show Contacts from Sub-Accounts(Child Accounts) in Parent Account

    Hi Leah,

    Thanks for your response!! What you explained is great but my requirement is to pull in all contacts of the Child account and Parent Account in Sub grid which is on the Parent Account. Yes!! I also have the parent account and child account look ups on the Contact form. Let me show you what i want :

    Take a look at the below advanced find query :

    pastedimage1597897468655v1.png

    This is what i need!! Here Account Funder Group is a Parent Account and Account External Entity is the Child Account, both can have contacts right!! So, What i want is if there are 3 contacts for Account External Entity(Child Account) & 2 Contacts for Account Funder Group (Parent Account) inside the Parent Account's Contact sub grid it should show 5 contacts. I also tried to create a Dynamics Fetch XML which can be used within the JS as a web resource but i cannot find a way to combine the two different FetchXML's :

    1) Which will bring up the List of Contacts from Account Funder Group (Parent Account) & join it with

    2) List of Contacts from the Account External Entity(Child Account).

    Can you help me with this?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Display/Show Contacts from Sub-Accounts(Child Accounts) in Parent Account

    Hi Dhawal

    If your "Parent Account" & "Child Account" are two entities, In Contact form, two lookup fields are related to Parent Account and Child Account entities separately. Right?

    You can create a new lookup field ’child related parent’ on contact form, then create a workflow to fill the field according child Account field automatically. if child account field has value and it also has parent Account, you can fill it with value of parent account field value of child account.

    However, it will not show parent and child records in one sub-grid, you need create another new sub-grid on contact form.

    Here are steps.

    1.On contact form, create a lookup field ‘child related parent’ that related to Parent Account,

    pastedimage1597832642246v1.png

    2.On Parent Account form, create a new sub-grid to related to this lookup field.

    pastedimage1597832651497v2.png

    3.create a workflow on Contact entity.

    Check ‘As an on-demand process’ to update previous records.

    pastedimage1597832765788v3.png

    2.Expand Add Steps to add actions.

    (1) select check Condition.

    pastedimage1597832780618v4.pngpastedimage1597832784333v5.png

    (2) select Update Record. 

    pastedimage1597832797342v6.pngpastedimage1597832829702v8.png

    Click Set Properties to set field value.

    pastedimage1597832824566v7.png

    4.Save and Active the workflow.

    5.Test.

    (1)create a contact and select one child Account, save and wait several minutes to refresh form.

    If ‘Test Child A’ has Parent Account, child related parent field will be filled automatically.

    pastedimage1597832919865v9.png

    (2) on the Test Parent A form, you will see:

    pastedimage1597832965346v10.png

    Regards,

    Leah Ju

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans