You need to sign in to do that
Don't have an account?
asoyer
Passing selected record ids to Apex controller from List View
I'm looking for an alternative to passing selected records from a List View via the URL. Here is how I'm currently doing it, but I'm running into IE URL limits when more than 100 records are selected. This is a custom List view button executing JavaScript.
var ids = {!GETRECORDIDS( $ObjectType.Account )};
if(ids.length < 1 ) {
alert('Please select at least one Account.')
}
else {
// window.open('/apex/Quick_Email?rec='+ids.join(',')+'&retURL=001/o');
window.location='/apex/Quick_Email?rec='+ids.join(',')+'&retURL=001/o';
}
What other methods could I implement?
You could create a custom list view button that points to a visual force page that uses the standard list controller and uses a custom controller extension to do the actions you want. For example:
VF Page:
Extension controller:
All Answers
You could create a custom list view button that points to a visual force page that uses the standard list controller and uses a custom controller extension to do the actions you want. For example:
VF Page:
Extension controller:
Thanks tedward. this worked great. The StandardSetController did the trick.
Is it possible to use this technique without a Custom Button?
I would like to call a visualforce page like the one shown above with a set of records from another Visualforce Page with own Apex Controller:
is there a way to accomplish that?