How To: Create Custom Trees

15 min read



The aim of this document is to describe the process that can be used to create custom trees. A use case for this would be where you have regions with various levels of detail. 

Quick example would be you have location information for client information, but some have defined it to country, some are defined to state level, some are town. In this case you could create a hierachy of Country --> State --> Town/ CIty


  • Knowledge on how to create a custom object
  • Knowledge on how to export system templates
  • Knowledge on how to import files
  • Knowledge on how to create custom buttons (optional)
  • Knowledge on how to create a custom view

Creating Custom Object

Creating the custom object is going to need to be done in two stages, with an upgrade of the DB at each step

Create Table

Creating the table with a simple Name/Description:


The key to note here is that the Name field has been given the properties of Is Part Of KeyIs Label this is the field that you want the hierarchy to work off of. Upgrade the DB for this table.

Create Link

Once you have created the table, you now need to create a link back to it:



Once that has been created, update the DB for this amendment.

Creating Your Tree

Navigate to API --> Custom Trees. This is where we define how the tree is going to work:


Name The name you want to give your tree
Entity Type The name of the table that you created
Tree Label Property This is the field in the table that the hierarchy will be pivoted on
Tree Parent Node Property This is the field that will store the ID of the parent


Interacting with your Tree

Populating with data

To populate your table with data, export a system template for your chosen created table. In the example created above:

Description Optional Field
Name This is the name you want to show in the tree
CustomTreeParentID This is the GUID for the parent (not required if you complete name)
CustomTreeParentID_Name This is the parent of the name. If it is a top level option, then leave it blank

Once you have your data, upload it into Lemonedge.

Creating a Grid (Optional)

Once you have created your tree, you have in the background of the system created a custom grid. If you want to be able to interact with it the UI, you can create a button to do so

Using your tree

To use your tree for capturing data, you need to now link to it from a custom table that you are creating. A simple example:


Then create your custom view and use it in your extension. To complete for the example above:



The above show the hierarchy that was created in the custom object. The names were given as "Level X" and only one entry, but you can define as many as you would like.

Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.