Account hierarchy

Account hierarchy

Add Account Hierarchy to an Account record page using Lightning App Builder.

The component follows the standard Parent Account relationship upwards and displays the accessible ancestor chain, with the highest ancestor first. It continues beyond the immediate parent and grandparent rather than stopping at a fixed display depth. Each level is indented beneath its parent.

The current account is highlighted and marked Current. Accounts sharing its immediate parent appear at the same level, sorted by name. The current account starts expanded. Click the chevron beside any account to load its children, then expand those children to explore grandchildren and deeper descendants. Account names link to their records.

For example, if Branch has Parent Account set to Region, and Region has Parent Account set to Company, opening Branch displays Company, Region and Branch at successive levels.

Working with large hierarchies

Children load in alphabetical groups of 25 within each branch. Use Show 25 more beneath a branch to append its next page. A count such as 25+ children means 25 have loaded and more are available; 100 children means the complete list of 100 has loaded.

Branches load only when expanded. Collapsing and reopening a branch reuses its loaded records. Collapse branches closes descendant and sibling branches while keeping the current account expanded. The hierarchy panel scrolls independently so large lists do not take over the record page.

If loading fails, the affected branch keeps its existing records and offers Retry. An expanded account with no accessible children displays No child accounts.

Scope and access

The view shows the ancestor chain, the current account's siblings, and expandable descendants. It does not automatically load every descendant or show the siblings of each ancestor. The initial sibling list is limited to 500 records; children within expanded branches are paginated.

The component uses the current user's Salesforce account access. Ancestors load progressively. If an ancestor request fails or an account is unavailable, the component keeps the known hierarchy visible and displays a message. Relationships that Salesforce does not expose to the user cannot be traversed.

The hierarchy is for navigation and portal access only. Invoicing does not follow Parent Account: to invoice a child account's work to its parent (or any other account), set the child's Invoice To Account. See Invoicing, Bill-to resolution.

If an expected ancestor is missing, check the Parent Account field at each level and confirm the viewing user can access those accounts. Reload the record page after changing hierarchy relationships.