function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<!-- VF Page------------> <apex:page controller="AccountCustomController "> <apex:form > <apex:selectList size="1" value="{!selectedname}"> <apex:selectOptions value="{!selectedaccnamefields}"/> </apex:selectList> </apex:form> </apex:page> /***** Controller Class**********/ public class AccountCustomController { Public string selectedname{get;set;} Public List<Selectoption> getselectedaccnamefields(){ List<Selectoption> lstnamesel = new List<selectoption>(); lstnamesel.add(new selectOption('', '- None -')); for(Account acc :[SELECT id,name,phone,type,industry FROM Account]){ lstnamesel.add(new selectoption(acc.phone,acc.name)); } return lstnamesel; } }
Please use the following code: Let me know if it helps you.
Many Thanks,
Sunil Rathore
If it solves your problem then please mark it the best answer so that it may help others who are facing the same problem and can be found easily.
Many Thanks,
Sunil Rathore