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
mohit Srivastavamohit Srivastava 

Display data on the basis of different record type on same visual force via pagination

hi,

guys help me i am stuck in a scenario in which i have to display data of Account on visualforce page according to the record type , that vf page has a pagination .. on one page i want to display data of one recordtype and when i click next in the vf page i want to display data of another record type.
Akhil AnilAkhil Anil
You need to override the method that is being called when the next button is clicked so that it fetches the records with the RecordType that you want.
 
mohit Srivastavamohit Srivastava
hi akhil
how can i display the data on the basis of different record type ... like i have 3 record type on object and on the first page i want to display the data of one recordtype and when i click on next button i want to display the data of second record type  and son on .. i dont want to get the record type manually , could u help on this 
Akhil AnilAkhil Anil
Assume that you are currently displaying the data in your VF page from an instance named "rcts". So, on click of the next button, it should call a method similar to something below.
 
public void next() {

  rcts.clear(); 
  ofvalue = pageno*10; 
  
  query = this.queryprepare(query);
  
  query = query + ' limit 10' + 'offset ' + ofvalue;   /*Add the filter crieria for RecordType here*/
   
  rcts = Database.query(query);

}