You need to sign in to do that
Don't have an account?
Jonathan Almqvist
StandardSetController.getSelected returns undefined
<apex:page standardController="Account" extensions="AddCampaignControllerExtension" recordSetVar="Accounts"> <apex:includeLightning /> <div id="lightning" style="height:150px;"/>
public with sharing class AddCampaignControllerExtension{ public List<Account> selectedList{ get; set; } ApexPages.StandardSetController setCon; public AddCampaignControllerExtension(ApexPages.StandardSetController controller) { setCon = controller; List<Account> selectedList = setCon.getSelected();
I have these code bits. I have posted only the relevant bits. I am using a visualforce page with a standardcontroller and also an extensioncontroller (standardSetcontroller). My problem is that getSelected is not filling out the selected values from my list view.
Anyone have any help or pointers I would be very glad. Thanks in advance!
Maybe it Helps
StandardSetController.getSelected() should return all selected records.
https://success.salesforce.com/issues_view?id=a1p3A000000mD1GQAU&title=standardsetcontroller-getselected-does-not-return-expected-records-in-lightning-experience
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_pages_standardsetcontroller.htm
http://salesforcevenkat81215.blogspot.com/2017/06/how-to-show-10000-records-in.html
https://andyinthecloud.com/2013/07/16/how-to-call-apex-code-from-a-custom-button/
http://www.cloudyabhi.com/2013/09/concept-of-standardsetcontroller-for.html
I will read this of course but my problem is slightly different. I NEED to have StandardController="Account" in my visualforce because my visualforce is displaying because I am pressing a List Button on the Account List View.
So my SetController needs to be an extension, maybe. That is my problem.