You need to sign in to do that
Don't have an account?
turbo2oh
standardsetcontroller getlistviewoptions only returning All
I've created a new list view for Contacts and made it available to all Users. When I run .getListViewOptions() it only returns 'All'. I'm also logged in as the admin user. Any idea why no others are showing up?
public class Ctl_CreateContactsForms { public ApexPages.StandardSetController setCtrl{get; set;} public string filterOption {get;set;} public Ctl_CreateContactsForms () { setCtrl = new ApexPages.StandardSetController(Database.getqueryLocator([Select Id,Name FROM Contact])); setCtrl.setPageSize(5); } public list<SelectOption> getallListViewOptions () { system.debug('setCtrl.getListViewOptions()'+setCtrl.getListViewOptions()); return setCtrl.getListViewOptions(); } // Initialize setCon and return a list of records public List<Contact> getcontactList() { return (list<Contact>) setCtrl.getRecords(); } }
do you want selected records in your controller?
Looks like Bhawani found the answer here:
http://boards.developerforce.com/t5/Visualforce-Development/StandardSetController-getListViewOptions-only-returning-All/td-p/462971