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
VenkataRajaVenkataRaja 

implement Go to List All link in related list.

Hi,

 

       How can I implement Go to LIst All Link in related list. And when we press on that link it needs to show all records for that parent.

 

Thanks & Records

Venkat

Ashish_SFDCAshish_SFDC

Hi Venkat, 

 

Try this, 

 

 

Apex :

public Boolean showRecords{get;set;}
public List<CustomObject__c> cust {get;set;}
//In constructor
showRecords =false;
public void fetchRecords(){ cust = [Select Field1__c, Field2__c from CustomObject__c limit 1000];// you need to place a limit of 1000 as VF supports max of 1000 recors to be displayed
showRecords = true;
}

 

VFP:

<apex:pageblock>
<apex:commandButton value="List Records" action="{!fetchRecords}" rerender="pbTable"/> <apex:pageblocktable value="{!cust}" var="a" id="pbTable" rendered="{!showRecords}"> <apex:column value="{!a.Field1__c}"/> <apex:column value="{!a.Field2__c}"/> </apex:pageblocktable > </apex:pageblock>

 

Regards,

Ashish