+ Start a Discussion
Kishore Vamsi 6Kishore Vamsi 6 

How to display more than 1000 values in picklist using select option

I want to display more than 1000 account names in one picklist using select option.

<apex:selectList value="{!myAccountspicklist}" >
<apex:selectOptions value="{!myaccounts}"/>

public List<Account> getMyaccounts(){
        List<Account> lstAccount = [select id,name from account];
        return lstAccount;
Raquib SFRaquib SF
Hi Kishore,

For reference : https://developer.salesforce.com/forums/?id=906F0000000MMUfIAO

Although, I must ask - why do you want to display 1000 values in a picklist?

Kishore Vamsi 6Kishore Vamsi 6
I want to display more than 1000 account name in one picklist field using selectOption. Earlyer I am able to display 20 name using above code but after inserting more than 1k it is throwing error.