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
mahesh reddy 4mahesh reddy 4 

Need to display all fields?

I have created three custom objects all are linked using master detail relationship(one is master and two are childs.). How can i display all the fields of three objects in a single vf page? Any help please?
Abhinav S.Abhinav S.
You can build and display a wrapper list having instances of all three objects with it as properties.
Abhinav S.Abhinav S.
This will be something like as:-
public class MyMainClass {
public List<MyWrapper> myWrapperList {get; set;}

//Wrapper class
pubilc class MyWrapper {

public Account acc {get; set;}
public contact con {get; set;}
public case cs {get; set;}

//Constructor
public MyWrapper (Account acc, Contact con, Case cs) {
this.acc =acc;
this.con =con;
this.cs = cs;
}
}

First populate the wrapper list i.e. myWrapperList  as per your requirment.
Then bind it to VF page for displaying values.