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
AthiAthi 

How to Multiselect All records in the view using Custom button?

I am searching all blog to death but with no solution.
Requirement:
Mass update or Calculate All records in list view using Custom button. I tried two ways
1. Embedded Visualforce page with flow 
2. visualforce page with StandardController
Multiselect in custom button allows me to select records in give page. Say, In "AllAccounts" view has 500records. I can only process first page(Upto 200records) by using above method. 
Is there anyway to process all the records in a given view by using custom list button? code below

<apex:page standardController="Contact" recordSetVar="Contacts" id="updateOwnerPage"> <apex:form > <apex:sectionheader title="Change Owner for Contacts"/> <apex:pageblock mode="edit"> <apex:pagemessages /> <apex:pageblocksection title="Change" columns="1"> <apex:pageblocksectionitem > <apex:outputlabel for="owner">New Owner</apex:outputlabel> <apex:inputfield id="owner" value="{!Contact.OwnerId}"/> </apex:pageblocksectionitem> </apex:pageblocksection> <apex:variable var="call" value="{!0}" /> <apex:repeat value="{!Selected}" var="con"> <apex:pageblocksection title="Selected Contacts" columns="1"> <apex:pageblocktable value="{!con}" var="j" > <apex:column > <apex:facet name="header">Contact Name</apex:facet> <apex:outputlink value="{!URLFOR($Action.Contact.View, j.id)}"> {!j.FirstName} {!j.LastName}</apex:outputlink> </apex:column> <apex:column > <apex:facet name="header">Account Name</apex:facet> <apex:outputlink value="{!URLFOR($Action.Account.View, j.Account.id)}"> {!j.Account.Name}</apex:outputlink> </apex:column> <apex:column > <apex:facet name="header">Current Owner</apex:facet> {!j.Owner.Name} </apex:column> </apex:pageblocktable> </apex:pageblocksection> <apex:variable var="call" value="{!call+1}"/> </apex:repeat> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr height="5"> <td width="35%" class="outsideround_head" align="right"> Total Contacts Returned:&nbsp; </td> <td width="8%" class="outside_round_head_value"> <apex:outputText value="{!call}"/> </td> </tr> </table> <apex:pageblockbuttons location="bottom"> <apex:commandbutton value="Save" action="{!save}"/> <apex:commandbutton value="Cancel" action="{!cancel}"/> </apex:pageblockbuttons> </apex:pageblock> </apex:form> </apex:page>