function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srinath R 9Srinath R 9 

Tree View in Salesforce to show records hierarchy


I have a custom object to store Milestones and Tasks for a Project Management application which I am building in Salesforce. The Mielstone and Tasks are distinguishable in the custom object using a different record type.

Since Tasks are child of milestones , I need to display my complete project hierarchy using a tree view. I am able to bring in the data however I am facing issues with aligning the column width if I go deeper in the tree view. I want to show 4 columns. Can someone please guide me how to show the tree view keeping the column width fixed?

I tried using nested table but the view becomes clumsy with indendation of the column header as well.

What I want to achieve is something like the one given below

Name                                  Duration                           Assigned to
Milestone 1
        Task 1                         10                                    ABC
        Task 2                         20                                    XYZ
        Milestone 2             
                  Task 1 M2          10                                    DEF
Srinath R 9Srinath R 9

Thanks for your response. I did check the links posted in and the functionality which I am trying to achieve is very much similar to the screenshot posted in

However I do not find the source code for this.

*forcecapitalinfo *website is down.
*forschool *shows only the name column. The challenge I am facing is with
the column alignment when displaying multiple columns as I go deep in the
*salesforcewithfunforce *shows data in nested table i do not want this
*teachmesalesforce *shows only role name
*infallibletechie *seperates columns by || I want to show the same
information like a single table so that the column information is more

Please help.
Laxman Vattam 26Laxman Vattam 26
were you able to achieve any solution finally? If so,can you the solution
Srinath R 9Srinath R 9
Yes we did find a solution please refer to the link below
EGA FuturaEGA Futura