You need to sign in to do that
Don't have an account?
pooja biswas
recordVarSet issue
Hi
I have a requirement as follows
In Account List View Page, I have added a custom button (fetch_Names) which will fetch all account names followed with contact details and opportunity details.
I have written the code for this.
so I miss out on many account with related contacts.
How to to make sure it display all the accounts names?
thanks
pooja
I have a requirement as follows
In Account List View Page, I have added a custom button (fetch_Names) which will fetch all account names followed with contact details and opportunity details.
I have written the code for this.
<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false"> <apex:pageBlock > <apex:repeat value="{!accounts}" var="a"> <apex:pageBlockSection title="{!a.name}"> </apex:pageBlockSection> <apex:relatedList list="Contacts" subject="{!a.Id}"/> <apex:relatedList list="Opportunities" subject="{!a.Id}" /> </apex:repeat> </apex:pageBlock> </apex:page>Its working in the sense it displays only a few accounts but not all the accounts.
so I miss out on many account with related contacts.
How to to make sure it display all the accounts names?
thanks
pooja
Basically how it works is based on the user's latest view opened.
Go to Accounts tab and select the view 'All Accounts' like below:
Now you can execute your code, it will display all accounts.
The reason behind this is,
This page does not specify a filter in the request, so the page is displayed with the last used filter. For information on using filters with list controllers, see Using List Views with Standard List Controllers.
For more information, please go through the below links:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_access_data.htm
Please do let me know if it helps you.
Regards,
Mahesh
Thanks for ur reply like wise let me be clear with a screen shot
sorry I was not clear with previous post.
I do not have any custom button, the LIST button of account is overriden with my visual force page.
Now I did exaclty as per ur post but its not showing all records only a few.
I created many accounts today but they are not reflecting.
Am I missing on something?
Thanks
pooja
It does not display all the records as per ur post.
The solution is to have an extension class and call SetPageSize.