Configuring the Tree Grid
Mar 28, 2025

The AppGrid tree grid view is designed to display hierarchical records, where the children of the parent record are displayed when the group field is expanded. This view can be used multiple ways, and this post will shed some light on how to configure the tree grid settings and the underlying data to achieve the results you desire.
There are 2 configuration settings that must be set for the tree grid to function. These settings can be accessed by clicking the configuration button in the grid toolbar.
The first setting is the parent lookup field. If we were viewing Account records in the tree grid, the value of this setting would be ParentId. If we were viewing a custom object, then choose the field that is the parent reference field you have defined.
The second setting is the group field. This is the field that will contain the values we want the tree grid to display hierarchically. The best way to explain the result of choosing a value for this field is by example.
Let's assume that we have a hierarchy of records like Accounts. If we choose the Name field for the group field setting, then what we would see in the tree grid group field when we expand a parent row, is all of the child account names. That's certainly a value use case for the tree grid.
Another very common use case for a tree grid is to display parts in a bill of material. This would be similar to the account example, where the child record group field would be displaying part names.
Let's explore another use case. Assume we have a custom object named Forecast. When viewing the Forecast records in the tree grid, we are interested in seeing the values of the product and services forecast at the forecast year, period, region, sales channel and product/service levels. Similar to something like this:

Here is what the Forecast records in the database may look like (abbreviated for brevity):
Name | Forecast Year | Forecast Period | Channel | Region |
---|---|---|---|---|
2025 Forecast | 2025 | |||
Q1 | 2025 | Q1 | ||
Direct Sales | 2025 | Q1 | Direct Sales | North America |
Direct Sales | 2025 | Q1 | Direct Sales | South America |
The main point is that we are using the Name field in the database records to contain the value we want the tree grid to display hierarchically, and we have configured the tree grid group field setting to this field.