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
Chamil MadusankaChamil Madusanka 

Create a Tree View in salesforce

I want to populate treeview same as Organization's Role Hierarchy in salesforce. Add/Edit features should be threre. But this tree view should not reflect the Organization's Role Hierarchy.

 

Example:

 

Admin1
|------ Manager1
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager2
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5
|------ Manager3
--|------ ReportingPerson1
--|------ ReportingPerson6
--|------ ReportingPerson7
--|------ ReportingPerson8
|------ Manager4
--|------ ReportingPerson2
Admin2
|------ Manager5
--|------ ReportingPerson1
--|------ ReportingPerson2
|------ Manager6
--|------ ReportingPerson3
--|------ ReportingPerson4
--|------ ReportingPerson5

 

--Chamil Madusanka

Chamil MadusankaChamil Madusanka

That's really nice. But I want Add/Edit feature same as the Organization's Role Hierarchy. Any idea?

minkeshminkesh

Hello chamil,

                        I have one solution.i have developed that functionality what you want.i have developed that using Jquery and JSON.see this link -- http://www.jstree.com/demo .Let me know if you want to build this in your visualforce page.

 

 Thank you,

Minkesh Patel

Chamil MadusankaChamil Madusanka

This is the solution I were finding? That's Really nice. I want to build this in my visualforce page. could you please help me.

minkeshminkesh

Hello,

          sure i can help u.i'll post u can that i have developped.

Thank you

Minkesh Patel

Chamil MadusankaChamil Madusanka

Thank you veru much Minkesh..

SayasoniSayasoni

Hi Guys,

Could you kindly share the visualforce form for this?

Thanks in advance.

Nisha ChughNisha Chugh

Child              Parent

1. ABC              BCD
2. BCD             DEF
3. DEF              GHI
4. GHI
5. 123               456
6. 678               456


OUTPUT IS: in the form of tree

    1.-----------GHI
            ------------DEF
                  - -----------BCD
                          ------------ABC

     2.-----------456
               ----------123

               -----------678

but my output is:

        1. ------------BCD
                  ------------ABC
        2. ------------DEF
                  ------------BCD
             --------------------ABC
        3.-------------GHI
            -----------------DEF
           -----------------------BCD
          -----------------------------ABC
         4.--------------- 456
             --------------------123
         5. ---------------456
           ---------------------678

minkeshminkesh

Hello Nisha,

 

What you are trying to do ? What you have used to accomplish this tree structure. I have used Jquery to accomplish this tree structure.

 

Thanks,

Minkesh

Nisha ChughNisha Chugh

I have already used jquery but unable to get the required output.. actually there is only 1 object and i have used 4 different fields for that. the two fields are previously created and other two fields i have created to get the output. but facing these problems which i have mentioned earlier.  

minkeshminkesh

Hello,

 

how u are storing that tree structure ? i have used JSON to store it. and when it loads using JSON i was showing the whole tree.

 

Thanks,

Minkesh Patel

Ani_123Ani_123

Hi Minkesh,

 

             I am trying to implement treeview same as Organization's Role Hierarchy with add/edit features using jquery. Could you please share VF code to implement this.

 

Thanks

minkeshminkesh

Ani_123 ,

 

 

How may i help you ?

 

Ani_123Ani_123

Hi Minkesh,

 

   I have create treeview with jquery and each node with add and delete buttons to add nodes dynamically. after adding nodes I rerendered table to refresh new nodes in treetable but after rerender treeview showing all nodes expanded . If you want I can share my code to look into this.

 

Thanks,

minkeshminkesh

Which Jquery u are using ?

 

Ani_123Ani_123

Hi,

 

I am using

jQuery JavaScript Library v1.4.3

Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree

Bruce Yue -- SF ArchitectBruce Yue -- SF Architect
http://treeview-developer-edition.ap1.force.com/TestPage
http://forceguru.blogspot.sg/2011/12/displaying-role-hierarchy-on.html
venkatesh_d041.3888386112928691E12venkatesh_d041.3888386112928691E12
Hi All,

I need to do a similar development with Treeview having Add/Edit/Delete for each value.
Please let me know if anyone can help me here.

Very Urgent.

thanks in advance
Best Regards
Venkat
Plural BPlural B
@venkatesh_d041.3888386112928691E12---Please let me know if you have solution for Add/Edit/Delete for each value