Let’s discuss a business case, there are organizations which own multiple businesses. As a customer relationship manager, Dave wants to perform below tasks.
- See all child accounts for a particular organization in a sub grid
- View the number of child accounts for a specific account – use this field for creating filters/ customer journeys etc ( i.e. Send an email to organizations with more than three child accounts)
First, we need to see the out of the box functionality dynamics provides for this scenario.
Out of the box “Account” main form provides the “Parent Account” lookup field.
This field uses the relationship : account_parent_account
Let’s review this relationship:
It shows that parent account has 1: N relationship with child accounts. Meaning, one parent account can have multiple child accounts.
The relationship is hierarchical and any change you do to parent account will cascade through to child accounts. However, when you delete the parent account, it will remove parent link from all child accounts.
Now that we have understood the relationship behavior, let’s again look at each requirement.
- Create sub grid to show all child accounts.
Go to Account main form. Add Component > 1 Column Tab and we can name this “Child Accounts”
Now, add a Subgrid and select Accounts(Parent Account) as the entity. Then select “Active Accounts” as the default view.
Make sure to check the “show related records” check box
It should now add the Child Accounts grid to this tab.
Save > Publish and let’s test this.
Add parent account:
View the Child Accounts tab for ” Adventure Works”
Now Dave is able to see the child accounts for any account in the account form. Our goal in this whole exercise was to provide relationship manager with a better experience by having all account related information in one place.
In the next post let’s discuss how to configure a roll up field that will show the number of child accounts for an account. Then we can discuss useful scenarios for this roll up field.
Categories: Dynamics 365