You need to sign in to do that
Don't have an account?
Laxman Vattam 26
showing related records in hierarchy in visualforce page
I want to show 5 different custom object records in hierarchial way in Visualforce page. All these 5 objects are linked thru parent child relationships
CObject1
CObject 2
CObject3
CObject4
CObject5
As you see, each object is child to another. Now I want to display first record of CObject1 then followed by all its children and then second record of CObject1 followed by all 4 children and so on. How can I achieve it?
CObject1
CObject 2
CObject3
CObject4
CObject5
As you see, each object is child to another. Now I want to display first record of CObject1 then followed by all its children and then second record of CObject1 followed by all 4 children and so on. How can I achieve it?
I am currently learning the dynamic components in Apex/VFP because I will have to use them for this kind of problems precisely.
A first code and result could be like that:
I will need this kind of hierarchical component too but all the parameters should be dynamic (objecs, columns, formats and so on).
This first version is the one you write by default when you are not an expert of apex:dynamicComponent.
The next version should be much better.
Best regards
Alain
This initial code doesnt handle showing column headers for various objects in the hierarchy. Also, I dont see any easy way to show this hierachial data along with column headers with good UI experince. :(
I really appreciate your inputs
For VFP with a static layout (not dynamic), I heavily use <apex:column breakBefore="true"> for including a table into a column for my own tool I am building currently.
This is not dynamic but that works fine.
You "just" have to fill the map of data according the design of your VFP but that is not so complex.
'View Hierarchy' functionality to be available on custom objects:
https://success.salesforce.com/ideaView?id=08730000000BrHwAAK
Traversing through an Account’s Hierarchy in Apex: one object
https://jdspaceit.wordpress.com/2016/01/13/traversing-through-an-accounts-hierarchy-in-apex/
Managing multiple multilevel account hierarchies efficiently in Apex: one object
https://sfbypeter.wordpress.com/2015/10/19/managing-multiple-multilevel-account-hierarchies-efficiently-in-apex/
Best regards
Alain