LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • 👋Welcome
  • Getting Started
    • Product Tour
    • Quickstart Tutorial
    • Understanding The Essentials
      • Component Builder
      • Component Visibility
      • Target Page Object
      • Using Variables and Component Data
      • Publishing your Dynamic Components
      • Dynamic vs. Flow Components
    • Avonni Components App
      • Accessing the App
      • Folders
      • Templates
      • Version management
    • AppExchange Listing Page
    • Installation & Licenses Management
  • Tutorials
    • Projects
    • Components
      • Calendar
        • How to Create Events Quickly by Dragging
        • How to Add an Edit Action to Calendar Events
        • How to Add a New Event Button to the Calendar Header
        • How to Customize the Right-Click Menu
        • How to Reschedule Events with Drag and Drop
      • Columns
        • Creating a Responsive 3-Column Layout
      • Data Table
        • How to customize Data Table style
        • How to make a field editable
        • How to add clickable buttons
        • How to color-code badges
        • How to export data
        • How to configure search
        • How to set columns visibility
      • Kanban
        • Saving Changes on Drag-and-Drop
      • List
      • Metric
      • Record Detail
        • Saving Changes
    • Interactions
      • How to create an interaction to navigate to an object page
      • How to create an interaction to navigate to a record page
      • How to Pass Multiple Selected Records from a Dynamic Component to a Screen Flow
    • Reactive Components
      • Reactive Map and Data Table
      • Master-Detail Relationship with Data Tables
      • Vertical Tabs with Reactive Data Table
    • Style
      • How do you add space or a break between sections or fields?
    • Tips and Tricks
      • Using the Dynamic Component component
  • Component Builder
    • Overview
    • Configuring Components
      • Properties
      • Fields
      • Style
    • Data & Interactions
      • Data Sources
        • Manual
        • Picklist
      • Resources
        • Constant
        • Formula
        • Nested Queries
        • Query
        • Variable
      • Interactions
        • CRUD from Record Variable
        • Download
        • Execute Flow
        • Navigate
        • On Load
        • Open Alert Modal
        • Open Confirm
        • Open Dynamic Component Dialog
        • Open Dynamic Component Panel
        • Open Flow Panel
        • Open Flow Dialog
        • Show Toast
    • Advanced Topics
      • Undo / Redo
      • Copy and Paste
      • Keyboard Shortcut
  • Components
    • Explore All Components
    • Accordion
    • Alert
    • Audio Player
    • Avatar
    • Avatar Group
    • Badge
    • Barcode
    • Blockquote
    • Button
    • Button Group
    • Button Icon
    • Button Menu
    • Button Stateful
    • Calendar
    • Camera 🆕
    • Card
    • Carousel
    • Chart
    • Checkbox
    • Checkbox Button
    • Chip Container
    • Color Picker
    • Columns
    • Combobox
    • Container
    • Counter
    • Data LWC Container
    • Data Table
    • Date Picker
    • Date
    • Date Range
    • Dual Listbox
    • Dynamic Component
    • Formatted Address
    • Formatted Name
    • Formatted Value
    • Header
    • Icon
    • Icon Picker
    • Illustration
    • Image
    • Input Color
    • Input Date
    • Input Pen (Signature)
    • Input Text
    • Kanban
    • List
    • LWC Container
    • Map
    • Media Object
    • Metric
    • PDF Viewer
    • Pivot Table
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Rating
    • Record Detail
    • Relationship Graph
    • Scope Notification
    • Section
    • Separator
    • Slider
    • Status
    • Tabbed Container
    • Tabs
    • Text
    • Text Area
    • Timeline
    • Toggle
    • Tree
    • Vertical Visual Picker
    • Video Player
    • Visual Picker
    • Visual Picker Link
  • Help
    • Contact Support
    • Security
    • Performance Guide
    • Deployment Process
    • Release Notes
    • Report Bugs
Powered by GitBook
LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service
On this page
  • Configuring the Tree Component
  • Basic Properties
  • Data Source
  • Data Mappings
  • Other Settings
  • Header (Optional)
  • Selection and Interaction
  • Interactions
  • On Item Click
  • Example: Displaying Related Contacts under Accounts
  • 1. Create a Nested Query

Was this helpful?

  1. Components

Tree

The Avonni Tree presents hierarchical data in a user-friendly, expandable/collapsible tree for easy navigation.

Last updated 17 days ago

Was this helpful?

Configuring the Tree Component

Select the Tree component on the canvas to access its properties in the Properties Panel (right panel).

Basic Properties

  • API Name: (Text) A unique identifier for this component instance (e.g., AccountHierarchyTree).

  • Header: (Text, Optional) A title displayed above the tree. Example: "Account Hierarchy".

  • Is Multi Select: (Boolean - Checkbox) If enabled, the user can select multiple items.

  • Independent Multi Select: (Boolean - Checkbox) If enabled, users can select multiple items at different levels.

  • Show Item Count: (Boolean - Checkbox) If enabled, the number of child for each node will be displayed.

Data Source

Data Source: Choose how the Tree's data is populated:

Data Mappings

When using a dynamic data source, you must map fields from your data source to the Tree component's attributes. This tells the component how to display the data and structure the hierarchy.

Important Note for Query Data Source

To use the "Query" data source, you must structure your query as a nested query, even if you only display a single level of data (i.e. even if there isn't a true parent-child relationship). The top level of the nested query represents your primary data, and you can optionally add child queries for more profound levels of the tree. This differs from a standard query.

Note on Nested Query Steps

Please be aware that the interface and options for configuring Nested Queries have been updated since this tutorial was created. While the core concepts remain the same, the specific steps shown below may differ from those in the current Avonni Component Builder. We are working on updating this guide shortly to reflect the latest enhancements.

Other Settings

This section details the various configuration options available for the Avonni Tree component.

Header (Optional)

These settings control the appearance of an optional header area at the top of the Tree component.

Header: Text to display as the main header title.

Header Icon Name: (Likely a Salesforce Lightning Design System (SLDS) icon name) Specifies an icon to display next to the header text. Example: utility:folder.

Header Image Source: URL of an image to display in the header (instead of, or in addition to, the icon). Could be a static resource or a dynamically generated URL.

Selection and Interaction

These settings control how users interact with and select items in the tree.

Is Multi Select

Users can select multiple tree nodes simultaneously (e.g., using checkboxes or Ctrl+Click) if enabled. If disabled, only single selection is allowed. Collapse Disabled: If true, it prevents users from collapsing expanded tree nodes. This forces all branches to remain open.

Show Item Count

If enabled, displays the number of child items next to each parent node (e.g., "Accounts (5)").

Collapse Disabled

It prevents users from collapsing expanded nodes in the tree. When set to true, all branches of the tree remain open, and the expand/collapse controls (typically chevrons or plus/minus icons) are either hidden or disabled.


Interactions

On Item Click

Define an interaction that triggers when a user clicks on a tree item. Common actions:

  • Navigate: Go to the record detail page for the selected item.

  • Set Variable Value: Store the selected item's value (usually its ID) in a Variable resource.

  • Execute Flow: Launch a Flow, passing data from the selected item as input variables.

  • Show Toast: Displays a message.

Example: Displaying Related Contacts under Accounts

This example shows how to display a tree where Accounts are the parent nodes, and their related Contacts are the child nodes. This uses a Nested Query to retrieve both Accounts and Contacts efficiently.

1. Create a Nested Query

  • Add Query: Add a new "Nested Query"

  • Parent Object:

    • Select Account as the Object.ç

    • Add filters if needed

    • Do the Data Mappings with the Label and Metatext attribute

  • Child Object:

    • Click "Add Child Object" by clicking on the little arrow next to the parent object name.

    • Select Contact as the Object.

    • Do the Data Mappings with the Label and Metatext attribute.

Now, the Tree component displays Accounts as parent nodes. Expanding an Account node reveals its related Contacts as child nodes.

Manual

Enter data directly into the component configuration.

Picklist

Retrieve data dynamically from a standard or custom picklist field within Salesforce.

Nested Queries

Fetch data from related Salesforce objects using subqueries, enabling complex data retrieval.