> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid.md).

# Tree Grid

Build a Tree Grid for related Salesforce records, then add actions to open a nested record or review selected accounts in a Screen Flow.

Build a Tree Grid to show how Salesforce records relate to one another. Start with the Account hierarchy if your rows come from one object. Choose the Multi-Level tutorial if each level comes from a different object.

## Build the grid

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Show the current account in its hierarchy</strong></td><td>Show where an Account sits in its corporate structure by displaying its parent and child accounts in a Tree Grid on the Salesforce record page.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FkKUnLET4trkal5RCFvio%2Fcover-show-an-account-hierarchy.png?alt=media">cover-show-an-account-hierarchy.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid/show-an-account-hierarchy.md">Show the current account in its hierarchy</a></td></tr><tr><td><strong>Browse accounts, contacts and cases</strong></td><td>Browse open support cases by contact and account in one Salesforce Tree Grid, so service teams can review each branch without opening separate related lists.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FpVY1Ctv8fVmQ157HZHX9%2Fcover-browse-accounts-contacts-and-cases.png?alt=media">cover-browse-accounts-contacts-and-cases.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid/browse-accounts-contacts-and-cases.md">Browse accounts, contacts and cases</a></td></tr></tbody></table>

## Act on rows

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Open a record from a nested row</strong></td><td>Add a Tree Grid row action that opens the clicked contact or case in Salesforce while the grid keeps a separate selection for review.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2F59BykiA6whA98oVNZqGB%2Fcover-open-a-nested-record.png?alt=media">cover-open-a-nested-record.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid/open-a-nested-record.md">Open a record from a nested row</a></td></tr><tr><td><strong>Pass selected Tree Grid rows to a Screen Flow</strong></td><td>Send accounts selected across several branches of an Avonni Tree Grid to a Salesforce Screen Flow and display the chosen records for review.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FOZHrW5lVbZBVKGAsS9Cb%2Fcover-pass-selected-rows-to-a-screen-flow.png?alt=media">cover-pass-selected-rows-to-a-screen-flow.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid/pass-selected-rows-to-a-screen-flow.md">Pass selected Tree Grid rows to a Screen Flow</a></td></tr></tbody></table>

See the [Tree Grid reference](https://docs.avonnicomponents.com/dynamic-components/components/tree-grid.md) for all configuration settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/dynamic-components/tutorials/components/tree-grid.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
