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
Priya 212213Priya 212213 

Forming tree structure.

Hi all,
I have a scenario to build tree structure for an custom object which has its two own lookups(Parent and Alternate Parent).
I need to form a tree like 
Parent 
Child1
child a
abc 1 (For abc1, Child1 is Parent and child a is Alt Parent)
abc2 (for abc2, Child 1 is parent and no alternate parent). 
 
All there record has comes under same record of Custom obj 2.
My scenario is, 

For Custom obj2 named Plant1, then I have query all the records of Custom obj1 (Sites) and to display then as tree in lwc component.

Please suggest me ideas and share some code samples.


 
VinayVinay (Salesforce Developers) 
Check below examples that can help you on your implementation.

https://www.sfdcstuff.com/2017/10/lightning-tree-generic-lightning.html
https://rajvakati.com/2018/12/31/lightning-web-component-tree/

Thanks,
hs dsd 19hs dsd 19
There is a trouble with the elegance TreeChart that is a big JS magnificence for the locker carrier (?). The body of a category is completed in strict mode (prerequisite for the locker provider) with same page (https://treestandranger.com/). D3.Js with the aid of itself within the different hand is fully like minded with Lightning Aura however that isn't always enough with out the magnificence TreeChart.